aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Klausner2014-07-20 03:24:26 -0500
committerMaarten Lankhorst2015-01-26 03:08:40 -0600
commit96cf45542503dd4c892c7875340957d5515163ac (patch)
tree06fa8cd818c8c3fb1d814267d17f7b875ebc61d8 /xf86atomic.h
parent0c5aaeef51233aec89ee1f43f03d457f278f8fa0 (diff)
downloadexternal-libdrm-96cf45542503dd4c892c7875340957d5515163ac.tar.gz
external-libdrm-96cf45542503dd4c892c7875340957d5515163ac.tar.xz
external-libdrm-96cf45542503dd4c892c7875340957d5515163ac.zip
Fix libdrm's atomic_dec_and_test on Solaris.
_nv means new value, not old value! Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Diffstat (limited to 'xf86atomic.h')
-rw-r--r--xf86atomic.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xf86atomic.h b/xf86atomic.h
index bc482c92..0739ef71 100644
--- a/xf86atomic.h
+++ b/xf86atomic.h
@@ -85,7 +85,7 @@ typedef struct { uint_t atomic; } atomic_t;
85# define atomic_read(x) (int) ((x)->atomic) 85# define atomic_read(x) (int) ((x)->atomic)
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) == 0)
89# define atomic_add(x, v) (atomic_add_int(&(x)->atomic, (v))) 89# define atomic_add(x, v) (atomic_add_int(&(x)->atomic, (v)))
90# define atomic_dec(x, v) (atomic_add_int(&(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)