Changeset View
Changeset View
Standalone View
Standalone View
head/sys/sys/cdefs.h
Show First 20 Lines • Show All 866 Lines • ▼ Show 20 Lines | |||||
#define __requires_shared(...) \ | #define __requires_shared(...) \ | ||||
__lock_annotate(shared_locks_required(__VA_ARGS__)) | __lock_annotate(shared_locks_required(__VA_ARGS__)) | ||||
#define __requires_unlocked(...) \ | #define __requires_unlocked(...) \ | ||||
__lock_annotate(locks_excluded(__VA_ARGS__)) | __lock_annotate(locks_excluded(__VA_ARGS__)) | ||||
/* Function should not be analyzed. */ | /* Function should not be analyzed. */ | ||||
#define __no_lock_analysis __lock_annotate(no_thread_safety_analysis) | #define __no_lock_analysis __lock_annotate(no_thread_safety_analysis) | ||||
/* Function or variable should not be sanitized, ie. by AddressSanitizer */ | |||||
#if __has_attribute(no_sanitize) | |||||
#define __nosanitizeaddress __attribute__((no_sanitize("address"))) | |||||
#else | |||||
#define __nosanitizeaddress | |||||
#endif | |||||
/* Guard variables and structure members by lock. */ | /* Guard variables and structure members by lock. */ | ||||
#define __guarded_by(x) __lock_annotate(guarded_by(x)) | #define __guarded_by(x) __lock_annotate(guarded_by(x)) | ||||
#define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x)) | #define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x)) | ||||
#endif /* !_SYS_CDEFS_H_ */ | #endif /* !_SYS_CDEFS_H_ */ |