summaryrefslogtreecommitdiffstats
path: root/testsuites/smptests/smpatomic03
diff options
context:
space:
mode:
authorWeiY <wei.a.yang@gmail.com>2013-08-05 02:56:00 +0800
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-08-19 14:35:38 +0200
commit6931037e1d9327b41a6c84c946a0f45d68c1cf7d (patch)
treec28109d7fd80b596d93704c2cae6af0dff228f7b /testsuites/smptests/smpatomic03
parentExpose rtems_verror() (diff)
downloadrtems-6931037e1d9327b41a6c84c946a0f45d68c1cf7d.tar.bz2
correct memory model in smpatomic test case
Diffstat (limited to 'testsuites/smptests/smpatomic03')
-rw-r--r--testsuites/smptests/smpatomic03/tasks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuites/smptests/smpatomic03/tasks.c b/testsuites/smptests/smpatomic03/tasks.c
index b74bd9d247..2c45a00e24 100644
--- a/testsuites/smptests/smpatomic03/tasks.c
+++ b/testsuites/smptests/smpatomic03/tasks.c
@@ -30,9 +30,9 @@
for (i = 0; i < TEST_REPEAT; i++){ \
a = (R_TYPE)(rand() % ((R_TYPE)-1 / 2)); \
b = (R_TYPE)(rand() % ((R_TYPE)-1 / 2)); \
- _Atomic_Store_##NAME(&t, a, mem_bar); \
+ _Atomic_Store_##NAME(&t, a, ATOMIC_ORDER_RELEASE); \
_Atomic_Fetch_add_##NAME(&t, b, mem_bar); \
- c = _Atomic_Load_##NAME(&t, mem_bar); \
+ c = _Atomic_Load_##NAME(&t, ATOMIC_ORDER_ACQUIRE); \
rtems_test_assert(c == (R_TYPE)(a + b)); \
} \
locked_printf("\nCPU%d Atomic_Fetch_add_" #NAME ": SUCCESS\n", cpuid); \