From f3ad375fcfeb5e6d091029f15112f9d713f522d0 Mon Sep 17 00:00:00 2001
From: Brian Norris <banorris@uci.edu>
Date: Fri, 30 Nov 2012 15:05:44 -0800
Subject: [PATCH] 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.
---
 include/impatomic.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/include/impatomic.h b/include/impatomic.h
index 7ecc373..b64df7a 100644
--- a/include/impatomic.h
+++ b/include/impatomic.h
@@ -3846,4 +3846,17 @@ T* atomic<T*>::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__ */
-- 
2.34.1