diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-03 09:09:24 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-06 09:43:58 +0100 |
commit | 8b50a55001ec46f1cb2cfd096cec1df78ab68465 (patch) | |
tree | ed68c824f05263065068b76fb2fe4251b0bcb3de /cpukit | |
parent | libnetworking: Typo (diff) | |
download | rtems-8b50a55001ec46f1cb2cfd096cec1df78ab68465.tar.bz2 |
score: Add _Atomic_Fence()
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/score/include/rtems/score/atomic.h | 7 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/cpustdatomic.h | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/atomic.h b/cpukit/score/include/rtems/score/atomic.h index 757eaf70a5..81149ab1a4 100644 --- a/cpukit/score/include/rtems/score/atomic.h +++ b/cpukit/score/include/rtems/score/atomic.h @@ -43,6 +43,13 @@ extern "C" { */ #define ATOMIC_INITIALIZER_FLAG CPU_ATOMIC_INITIALIZER_FLAG +static inline void _Atomic_Fence( + Atomic_Order order +) +{ + _CPU_atomic_Fence( order ); +} + /** * @brief Initializes an atomic type value into a atomic object. * diff --git a/cpukit/score/include/rtems/score/cpustdatomic.h b/cpukit/score/include/rtems/score/cpustdatomic.h index e364eb945e..4023d0cbea 100644 --- a/cpukit/score/include/rtems/score/cpustdatomic.h +++ b/cpukit/score/include/rtems/score/cpustdatomic.h @@ -83,6 +83,13 @@ typedef enum { #define CPU_ATOMIC_INITIALIZER_FLAG ATOMIC_FLAG_INIT +static inline void _CPU_atomic_Fence( + Atomic_Order order +) +{ + atomic_thread_fence( (memory_order) order ); +} + /** * @brief Initializes an atomic type value into a atomic object. * |