Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/cdefs.h
Show First 20 Lines • Show All 878 Lines • ▼ Show 20 Lines | |||||
#define __nosanitizeaddress | #define __nosanitizeaddress | ||||
#define __nosanitizethread | #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)) | ||||
/* Alignment builtins for better type checking and improved code generation. */ | |||||
/* Provide fallback versions for other compilers (GCC/Clang < 10): */ | |||||
#if !__has_builtin(__builtin_is_aligned) | |||||
#define __builtin_is_aligned(x, align) \ | |||||
(((__uintptr_t)x & ((align) - 1)) == 0) | |||||
#endif | |||||
#if !__has_builtin(__builtin_align_up) | |||||
#define __builtin_align_up(x, align) \ | |||||
((__typeof__(x))(((__uintptr_t)(x)+((align)-1))&(~((align)-1)))) | |||||
#endif | |||||
#if !__has_builtin(__builtin_align_down) | |||||
#define __builtin_align_down(x, align) \ | |||||
((__typeof__(x))((x)&(~((align)-1)))) | |||||
#endif | |||||
#define __align_up(x, y) __builtin_align_up(x, y) | |||||
#define __align_down(x, y) __builtin_align_down(x, y) | |||||
#define __is_aligned(x, y) __builtin_is_aligned(x, y) | |||||
#endif /* !_SYS_CDEFS_H_ */ | #endif /* !_SYS_CDEFS_H_ */ |