summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/cpustdatomic.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-15 16:20:17 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-16 09:07:33 +0200
commit33d0666d02832f63dfd035c7ac9890b4397a1fdc (patch)
treec963937feb2dce85acaa27cb4663bb05fc1fbd43 /cpukit/score/include/rtems/score/cpustdatomic.h
parentbsp/qoriq: SMP support for IRQ support (diff)
downloadrtems-33d0666d02832f63dfd035c7ac9890b4397a1fdc.tar.bz2
score: Critical fix for SMP
The _Scheduler_SMP_Allocate_processor() and _Thread_Dispatch() exchange information without locks. Make sure we use the right load/store ordering.
Diffstat (limited to 'cpukit/score/include/rtems/score/cpustdatomic.h')
-rw-r--r--cpukit/score/include/rtems/score/cpustdatomic.h16
1 files changed, 3 insertions, 13 deletions
diff --git a/cpukit/score/include/rtems/score/cpustdatomic.h b/cpukit/score/include/rtems/score/cpustdatomic.h
index 222ad78852..a663a06293 100644
--- a/cpukit/score/include/rtems/score/cpustdatomic.h
+++ b/cpukit/score/include/rtems/score/cpustdatomic.h
@@ -54,23 +54,13 @@ typedef atomic_uintptr_t Atomic_Pointer;
typedef atomic_flag Atomic_Flag;
/**
- * @brief the enumeration Atomic_Memory_barrier specifies the detailed regular
- * memory synchronization operations used in the atomic operation API
- * definitions.
+ * @brief Memory order according to ISO/IEC 9899:2011.
*/
typedef enum {
- /** no operation orders memory. */
ATOMIC_ORDER_RELAXED = memory_order_relaxed,
- /** a load operation performs an acquire operation on the affected memory
- * location. This flag guarantees that the effects of load operation are
- * completed before the effects of any later data accesses.
- */
ATOMIC_ORDER_ACQUIRE = memory_order_acquire,
- /** a store operation performs a release operation on the affected memory
- * location. This flag guarantee that all effects of all previous data
- * accesses are completed before the store operation takes place.
- */
- ATOMIC_ORDER_RELEASE = memory_order_release
+ ATOMIC_ORDER_RELEASE = memory_order_release,
+ ATOMIC_ORDER_SEQ_CST = memory_order_seq_cst
} Atomic_Order;