X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=include%2Furcu%2Fuatomic%2Fgeneric.h;h=e31a19be7b269fbacb090ac349d4df45b433ac7e;hb=106ed13754b1b836f4b59405f4e02aea4bf5eef0;hp=c3762b0780b1f80c93c566012d8b904bd1984dbc;hpb=6fa8b4f80f1d2efbc90fc6d2a5fb0dc1d7fd2a19;p=urcu.git diff --git a/include/urcu/uatomic/generic.h b/include/urcu/uatomic/generic.h index c3762b0..e31a19b 100644 --- a/include/urcu/uatomic/generic.h +++ b/include/urcu/uatomic/generic.h @@ -38,19 +38,23 @@ extern "C" { #endif #if !defined __OPTIMIZE__ || defined UATOMIC_NO_LINK_ERROR -static inline __attribute__((always_inline, __noreturn__)) +#ifdef ILLEGAL_INSTR +static inline __attribute__((always_inline)) void _uatomic_link_error(void) { -#ifdef ILLEGAL_INSTR /* * generate an illegal instruction. Cannot catch this with * linker tricks when optimizations are disabled. */ __asm__ __volatile__(ILLEGAL_INSTR); +} #else +static inline __attribute__((always_inline, __noreturn__)) +void _uatomic_link_error(void) +{ __builtin_trap(); -#endif } +#endif #else /* #if !defined __OPTIMIZE__ || defined UATOMIC_NO_LINK_ERROR */ extern void _uatomic_link_error(void);