mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
util/atomic: Add p_atomic_add_return for the unlocked path
Fixes: 385d13f26d "util/atomic: Add a _return variant of p_atomic_add"
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
parent
1b6991ba1d
commit
752196a493
1 changed files with 1 additions and 1 deletions
|
|
@ -92,7 +92,7 @@
|
|||
#define p_atomic_add(_v, _i) ((void) p_atomic_add_return((_v), (_i))
|
||||
#define p_atomic_inc_return(_v) (++(*(_v)))
|
||||
#define p_atomic_dec_return(_v) (--(*(_v)))
|
||||
#define p_atomic_add(_v, _i) (*(_v) = *(_v) + (_i))
|
||||
#define p_atomic_add_return(_v, _i) (*(_v) = *(_v) + (_i))
|
||||
#define p_atomic_cmpxchg(_v, _old, _new) (*(_v) == (_old) ? (*(_v) = (_new), (_old)) : *(_v))
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue