From: Brian Norris Date: Fri, 30 Nov 2012 23:05:44 +0000 (-0800) Subject: impatomic: add atomic_{thread,signal}_fence() definitions X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=commitdiff_plain;h=f3ad375fcfeb5e6d091029f15112f9d713f522d0;hp=cc2accafaceffae9593b64b9f526d6c8d6239bd4 impatomic: add atomic_{thread,signal}_fence() definitions The impatomic.h header is outdated. Additional information from the ISO papers N2633, N2731, and N2752 have limited the "fence()" support to just these two functions. --- diff --git a/include/impatomic.h b/include/impatomic.h index 7ecc3737..b64df7af 100644 --- a/include/impatomic.h +++ b/include/impatomic.h @@ -3846,4 +3846,17 @@ T* atomic::fetch_sub( ptrdiff_t __v__, memory_order __x__ ) volatile } // namespace std #endif +#ifdef __cplusplus +extern "C" { +#endif +inline void atomic_thread_fence(memory_order order) +{ _ATOMIC_FENCE_(order); } + +/** @todo Do we want to try to support a user's signal-handler? */ +inline void atomic_signal_fence(memory_order order) +{ /* No-op? */ } +#ifdef __cplusplus +} +#endif + #endif /* __IMPATOMIC_H__ */