]> granicus.if.org Git - libatomic_ops/commitdiff
Add comment about store_full implementation for x86
authorIvan Maidanski <ivmai@mail.ru>
Sun, 26 May 2013 13:16:20 +0000 (17:16 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 26 May 2013 13:16:20 +0000 (17:16 +0400)
* src/atomic_ops/sysdeps/gcc/x86.h: Add comment about AO_store_full
generalization.

src/atomic_ops/sysdeps/gcc/x86.h

index 62b50c9d16aa89a6f999b451d580c900c52fa378..db66dda8dad6fe06cd2a9630dd0270e3ae7a171b 100644 (file)
@@ -114,6 +114,10 @@ AO_short_fetch_and_add_full (volatile unsigned short *p, unsigned short incr)
                         : "memory");
   }
 # define AO_HAVE_xor_full
+
+  /* AO_store_full could be implemented directly using "xchg" but it    */
+  /* could be generalized efficiently as an ordinary store accomplished */
+  /* with AO_nop_full ("mfence" instruction).                           */
 #endif /* !AO_PREFER_GENERALIZED */
 
 AO_INLINE AO_TS_VAL_t