LibQuicR
thread_safety.h File Reference

Portable wrappers for Clang thread-safety analysis attributes. More...

Go to the source code of this file.

Macros

#define QUICR_CAPABILITY(name)
 No-op capability marker when thread-safety annotations are disabled. More...
 
#define QUICR_ACQUIRE(...)
 No-op acquire annotation when thread-safety annotations are disabled. More...
 
#define QUICR_RELEASE(...)
 No-op release annotation when thread-safety annotations are disabled. More...
 
#define QUICR_REQUIRES(...)
 No-op lock-requirement annotation when thread-safety annotations are disabled. More...
 
#define QUICR_EXCLUDES(...)
 No-op lock-exclusion annotation when thread-safety annotations are disabled. More...
 
#define QUICR_NO_THREAD_SAFETY_ANALYSIS
 No-op analysis-suppression annotation when thread-safety annotations are disabled. More...
 
#define QUICR_TRY_ACQUIRE(...)
 No-op try-acquire annotation when thread-safety annotations are disabled. More...
 
#define QUICR_GUARDED_BY(...)
 No-op guarded-field annotation when thread-safety annotations are disabled. More...
 
#define QUICR_PT_GUARDED_BY(...)
 No-op pointer-guard annotation when thread-safety annotations are disabled. More...
 

Detailed Description

Portable wrappers for Clang thread-safety analysis attributes.

When QUICR_HAS_THREAD_SAFETY_ANNOTATIONS is not defined, every macro expands to nothing and has no runtime effect. These annotations describe locking contracts to static analysis; they do not acquire locks themselves.

Macro Definition Documentation

◆ QUICR_ACQUIRE

#define QUICR_ACQUIRE (   ...)

No-op acquire annotation when thread-safety annotations are disabled.

◆ QUICR_CAPABILITY

#define QUICR_CAPABILITY (   name)

No-op capability marker when thread-safety annotations are disabled.

◆ QUICR_EXCLUDES

#define QUICR_EXCLUDES (   ...)

No-op lock-exclusion annotation when thread-safety annotations are disabled.

◆ QUICR_GUARDED_BY

#define QUICR_GUARDED_BY (   ...)

No-op guarded-field annotation when thread-safety annotations are disabled.

◆ QUICR_NO_THREAD_SAFETY_ANALYSIS

#define QUICR_NO_THREAD_SAFETY_ANALYSIS

No-op analysis-suppression annotation when thread-safety annotations are disabled.

◆ QUICR_PT_GUARDED_BY

#define QUICR_PT_GUARDED_BY (   ...)

No-op pointer-guard annotation when thread-safety annotations are disabled.

◆ QUICR_RELEASE

#define QUICR_RELEASE (   ...)

No-op release annotation when thread-safety annotations are disabled.

◆ QUICR_REQUIRES

#define QUICR_REQUIRES (   ...)

No-op lock-requirement annotation when thread-safety annotations are disabled.

◆ QUICR_TRY_ACQUIRE

#define QUICR_TRY_ACQUIRE (   ...)

No-op try-acquire annotation when thread-safety annotations are disabled.