Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/cdefs.h
Show First 20 Lines • Show All 235 Lines • ▼ Show 20 Lines | |||||
#else | #else | ||||
#define __alloc_align(x) | #define __alloc_align(x) | ||||
#endif | #endif | ||||
#if !__GNUC_PREREQ__(2, 95) | #if !__GNUC_PREREQ__(2, 95) | ||||
#define __alignof(x) __offsetof(struct { char __a; x __b; }, __b) | #define __alignof(x) __offsetof(struct { char __a; x __b; }, __b) | ||||
#endif | #endif | ||||
#ifdef SMP | |||||
#define __aligned_if_smp(x) __aligned(x) | |||||
#else | |||||
#define __aligned_if_smp(x) | |||||
#endif | |||||
kib: I do not think it is right to predicate this on smp.
It should be an option, and I am fine with… | |||||
/* | /* | ||||
* Keywords added in C11. | * Keywords added in C11. | ||||
*/ | */ | ||||
#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L | #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L | ||||
#if !__has_extension(c_alignas) | #if !__has_extension(c_alignas) | ||||
#if (defined(__cplusplus) && __cplusplus >= 201103L) || \ | #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ | ||||
▲ Show 20 Lines • Show All 636 Lines • Show Last 20 Lines |
I do not think it is right to predicate this on smp.
It should be an option, and I am fine with the option be on by default.
Anyway, it is not appropriate to do that in the scope of this review.