Author: emaste
Date: Sat Aug 24 13:49:43 2013
New Revision: 254783
URL: http://svnweb.freebsd.org/changeset/base/254783

Log:
  MFC r254465: Correct implementation of atomic_flag_test_and_set
  
  (This is a direct commit to stable/9 as atomic_flag_test_and_set_explicit
  is an inline function on HEAD and in a different file.)

Modified:
  stable/9/include/stdatomic.h

Modified: stable/9/include/stdatomic.h
==============================================================================
--- stable/9/include/stdatomic.h        Sat Aug 24 13:42:20 2013        
(r254782)
+++ stable/9/include/stdatomic.h        Sat Aug 24 13:49:43 2013        
(r254783)
@@ -317,7 +317,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)
_______________________________________________
svn-src-stable-9@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"

Reply via email to