Permalink
Browse files

MF9 r254783: Correct implementation of atomic_flag_test_and_set

Approved by:	re
  • Loading branch information...
1 parent ce4cae6 commit 6111a723088866e805d5d3ea8f22f9553cfedd6c @emaste emaste committed Aug 24, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 include/stdatomic.h
View
@@ -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)

0 comments on commit 6111a72

Please sign in to comment.