repo.or.cz
/
cocotron.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge pull request #10 from gunyarakun/fix-invalid-return
[cocotron.git]
/
Foundation
/
NSAtomicCompareAndSwap.h
blob
169db089081fd31ec75bbe4c30292522c58fb8c6
1
2
#if COCOTRON_USE_NONATOMIC_COMPARE_AND_SWAP
3
#warning __sync_bool_compare_and_swap is nonatomic. Do not use more than one thread!
4
#define __sync_bool_compare_and_swap(pointer, a, b, ...) \
5
((*pointer == a) ? (*pointer = b), 1 : 0)
6
#endif