Changeset View
Changeset View
Standalone View
Standalone View
head/sys/sys/cdefs.h
Show First 20 Lines • Show All 874 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Function or variable should not be sanitized, i.e. by AddressSanitizer. | * Function or variable should not be sanitized, i.e. by AddressSanitizer. | ||||
* GCC has the nosanitize attribute, but as a function attribute only, and | * GCC has the nosanitize attribute, but as a function attribute only, and | ||||
* warns on use as a variable attribute. | * warns on use as a variable attribute. | ||||
*/ | */ | ||||
#if __has_attribute(no_sanitize) && defined(__clang__) | #if __has_attribute(no_sanitize) && defined(__clang__) | ||||
#define __nosanitizeaddress __attribute__((no_sanitize("address"))) | #define __nosanitizeaddress __attribute__((no_sanitize("address"))) | ||||
#define __nosanitizethread __attribute__((no_sanitize("thread"))) | |||||
#else | #else | ||||
#define __nosanitizeaddress | #define __nosanitizeaddress | ||||
#define __nosanitizethread | |||||
#endif | #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_ */ |