mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-20 04:40:09 +01:00
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>
This commit is contained in:
parent
0c5aaeef51
commit
96cf455425
1 changed files with 1 additions and 1 deletions
|
|
@ -85,7 +85,7 @@ typedef struct { uint_t atomic; } atomic_t;
|
|||
# define atomic_read(x) (int) ((x)->atomic)
|
||||
# define atomic_set(x, val) ((x)->atomic = (uint_t)(val))
|
||||
# define atomic_inc(x) (atomic_inc_uint (&(x)->atomic))
|
||||
# define atomic_dec_and_test(x) (atomic_dec_uint_nv(&(x)->atomic) == 1)
|
||||
# define atomic_dec_and_test(x) (atomic_dec_uint_nv(&(x)->atomic) == 0)
|
||||
# define atomic_add(x, v) (atomic_add_int(&(x)->atomic, (v)))
|
||||
# define atomic_dec(x, v) (atomic_add_int(&(x)->atomic, -(v)))
|
||||
# define atomic_cmpxchg(x, oldv, newv) atomic_cas_uint (&(x)->atomic, oldv, newv)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue