[cfe-commits] Patch for review/integration: __sync_swap()
Dave Zarzycki
zarzycki at apple.com
Fri Apr 8 18:09:54 PDT 2011
Background:
The __sync_*() atomic intrinsics do not directly expose the fundamental atomic swap operation that many processors support. One can indirectly get at the instruction by using __sync_lock_test_and_set(), but the documentation for that intrinsic does not promise to be an atomic swap on all architectures or even be a full barrier like the other __sync_*() intrinsics. This patch fixes this oversight:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: __sync_swap.patch
Type: application/octet-stream
Size: 3678 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110408/63bf7608/attachment.obj>
-------------- next part --------------
This is my first clang patch, so please be understanding if I made any newbie mistakes.
Thanks for considering this change,
davez
More information about the cfe-commits
mailing list