diff options
author | Jason Ekstrand <[email protected]> | 2019-12-05 11:49:18 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-12-05 11:55:21 -0600 |
commit | 752196a4938f92395bacba915f3240b88790145a (patch) | |
tree | 3d4b2bba40ce2539b7deac58219b212ac1585b0d | |
parent | 1b6991ba1d8df187869cbea1bf4d9da3f2e68824 (diff) |
util/atomic: Add p_atomic_add_return for the unlocked path
Fixes: 385d13f26d2 "util/atomic: Add a _return variant of p_atomic_add"
Reviewed-by: Ilia Mirkin <[email protected]>
-rw-r--r-- | src/util/u_atomic.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/u_atomic.h b/src/util/u_atomic.h index 45e8e2e0188..9cbc6dd1eaa 100644 --- a/src/util/u_atomic.h +++ b/src/util/u_atomic.h @@ -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 |