From: Roland Scheidegger Date: Mon, 9 Dec 2019 17:49:13 +0000 (+0100) Subject: util/atomic: Fix p_atomic_add for unlocked and msvc paths X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=23f1b78e8fd38dd844aefc19151ec31071ca5f64;p=mesa.git util/atomic: Fix p_atomic_add for unlocked and msvc paths Braces mismatch (flagged by CI, untested). Fixes: 385d13f26d2 "util/atomic: Add a _return variant of p_atomic_add" Reviewed-by: Brian Paul Reviewed-by: Jose Fonseca Reviewed-by: Dylan Baker Reviewed-by: Marek Olšák --- diff --git a/src/util/u_atomic.h b/src/util/u_atomic.h index 9cbc6dd1eaa..1ad87c8feb1 100644 --- a/src/util/u_atomic.h +++ b/src/util/u_atomic.h @@ -89,7 +89,7 @@ #define p_atomic_dec_zero(_v) (p_atomic_dec_return(_v) == 0) #define p_atomic_inc(_v) ((void) p_atomic_inc_return(_v)) #define p_atomic_dec(_v) ((void) p_atomic_dec_return(_v)) -#define p_atomic_add(_v, _i) ((void) p_atomic_add_return((_v), (_i)) +#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_return(_v, _i) (*(_v) = *(_v) + (_i)) @@ -146,7 +146,7 @@ (assert(!"should not get here"), 0)) #define p_atomic_add(_v, _i) \ - ((void) p_atomic_add_return((_v), (_i)) + ((void) p_atomic_add_return((_v), (_i))) #define p_atomic_add_return(_v, _i) (\ sizeof *(_v) == sizeof(char) ? _InterlockedExchangeAdd8 ((char *) (_v), (_i)) : \