From 8cf3e3fa3067816c0ad3c6ca6e981fe9a429339a Mon Sep 17 00:00:00 2001 From: emaste Date: Sat, 24 Aug 2013 13:58:17 +0000 Subject: [PATCH] MF9 r254783: Correct implementation of atomic_flag_test_and_set Approved by: re git-svn-id: svn://svn.freebsd.org/base/releng/9.2@254785 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- include/stdatomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/stdatomic.h b/include/stdatomic.h index 35469e31..b661b2fe 100644 --- a/include/stdatomic.h +++ b/include/stdatomic.h @@ -322,7 +322,7 @@ typedef atomic_bool atomic_flag; #define atomic_flag_clear_explicit(object, order) \ atomic_store_explicit(object, 0, order) #define atomic_flag_test_and_set_explicit(object, order) \ - atomic_compare_exchange_strong_explicit(object, 0, 1, order, order) + atomic_exchange_explicit(object, 1, order) #define atomic_flag_clear(object) \ atomic_flag_clear_explicit(object, memory_order_seq_cst) -- 2.42.0