On 04/20/2016 10:17 AM, Emilio G. Cota wrote:
I've tried to find a GCC intrinsic for test-and-set, and I've only found
lock_test_and_set, which is what we use for atomic_xchg (except on ppc)
because it really is an atomic exchange:
  "This builtin, as described by Intel, is not a traditional test-and-set
   operation, but rather an atomic exchange operation."
  https://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html

Please read the entire documentation, not just the first sentence.


r~

Reply via email to