We only require stores to not be reordered with other stores, so the release semantics (load+store, store+store) would be enough. Note that sequentially consistent memory accesses usually involve an expensive memory barrier on most architectures.
Signed-off-by: Jinoh Kang jinoh.kang.kr@gmail.com --- server/fd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/fd.c b/server/fd.c index 5865db89c33..ad010d4b4ea 100644 --- a/server/fd.c +++ b/server/fd.c @@ -393,7 +393,7 @@ static void atomic_store_ulong(volatile ULONG *ptr, ULONG value) #if defined(__i386__) || defined(__x86_64__) *ptr = value; #else - __atomic_store_n(ptr, value, __ATOMIC_SEQ_CST); + __atomic_store_n(ptr, value, __ATOMIC_RELEASE); #endif }
@@ -406,7 +406,7 @@ static void atomic_store_long(volatile LONG *ptr, LONG value) #if defined(__i386__) || defined(__x86_64__) *ptr = value; #else - __atomic_store_n(ptr, value, __ATOMIC_SEQ_CST); + __atomic_store_n(ptr, value, __ATOMIC_RELEASE); #endif }