aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Coopersmith2010-04-16 19:34:11 -0500
committerAlan Coopersmith2010-04-16 19:37:58 -0500
commitc9065c5963db1b8196d278c47b8da2c33a3c49d1 (patch)
tree9d07a60249c0b32c56e15f73361cb8b188fe2e71 /xf86atomic.h
parent3c7ae8abe1eee1b1231f7c81e9898485940901c7 (diff)
downloadexternal-libdrm-c9065c5963db1b8196d278c47b8da2c33a3c49d1.tar.gz
external-libdrm-c9065c5963db1b8196d278c47b8da2c33a3c49d1.tar.xz
external-libdrm-c9065c5963db1b8196d278c47b8da2c33a3c49d1.zip
Correct the Solaris definitions of atomic_add & atomic_dec
The #defines added in 966c9907c040b4fe4b288b4a9d82598797aee743 were mapping these to functions that don't exist. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xf86atomic.h')
-rw-r--r--xf86atomic.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/xf86atomic.h b/xf86atomic.h
index 854187a0..db2f6195 100644
--- a/xf86atomic.h
+++ b/xf86atomic.h
@@ -86,8 +86,8 @@ typedef struct { uint_t atomic; } atomic_t;
86# define atomic_set(x, val) ((x)->atomic = (uint_t)(val)) 86# define atomic_set(x, val) ((x)->atomic = (uint_t)(val))
87# define atomic_inc(x) (atomic_inc_uint (&(x)->atomic)) 87# define atomic_inc(x) (atomic_inc_uint (&(x)->atomic))
88# define atomic_dec_and_test(x) (atomic_dec_uint_nv(&(x)->atomic) == 1) 88# define atomic_dec_and_test(x) (atomic_dec_uint_nv(&(x)->atomic) == 1)
89# define atomic_add(x, v) (atomic_add_uint(&(x)->atomic, (v))) 89# define atomic_add(x, v) (atomic_add_int(&(x)->atomic, (v)))
90# define atomic_dec(x, v) (atomic_dec_uint(&(x)->atomic, (v))) 90# define atomic_dec(x, v) (atomic_add_int(&(x)->atomic, -(v)))
91# define atomic_cmpxchg(x, oldv, newv) atomic_cas_uint (&(x)->atomic, oldv, newv) 91# define atomic_cmpxchg(x, oldv, newv) atomic_cas_uint (&(x)->atomic, oldv, newv)
92 92
93#endif 93#endif