projects
/
platform
/
upstream
/
libHarfBuzzSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
022a05a
)
Implement hb_atomic_int_set() for OS X
author
Behdad Esfahbod
<behdad@behdad.org>
Fri, 18 May 2012 02:02:08 +0000
(22:02 -0400)
committer
Behdad Esfahbod
<behdad@behdad.org>
Fri, 18 May 2012 02:02:08 +0000
(22:02 -0400)
src/hb-atomic-private.hh
patch
|
blob
|
history
diff --git
a/src/hb-atomic-private.hh
b/src/hb-atomic-private.hh
index
a348f95
..
03d7df1
100644
(file)
--- a/
src/hb-atomic-private.hh
+++ b/
src/hb-atomic-private.hh
@@
-56,6
+56,8
@@
typedef long hb_atomic_int_t;
#include <libkern/OSAtomic.h>
typedef int32_t hb_atomic_int_t;
#define hb_atomic_int_add(AI, V) (OSAtomicAdd32Barrier((V), &(AI)), (AI) - (V))
+#define hb_atomic_int_set(AI, V) \
+ do {} while (!OSAtomicCompareAndSwap32 (hb_atomic_int_get (AI), (V), (&(AI))))
#define hb_atomic_int_get(AI) OSAtomicAdd32Barrier(0, &(AI))