mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 18:30:09 +01:00
util/atomic: fix return type of p_atomic_add_return() fallback
Fixes: 385d13f26d ("util/atomic: Add a _return variant of p_atomic_add")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3012>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3012>
This commit is contained in:
parent
ac0219cc5b
commit
d60b8fd3cb
1 changed files with 1 additions and 1 deletions
|
|
@ -216,7 +216,7 @@
|
|||
sizeof(*v) == sizeof(uint64_t) ? atomic_add_64((uint64_t *)(v), (i)) : \
|
||||
(assert(!"should not get here"), 0))
|
||||
|
||||
#define p_atomic_add_return(v, i) (void) ( \
|
||||
#define p_atomic_add_return(v, i) (__typeof(*v)) ( \
|
||||
sizeof(*v) == sizeof(uint8_t) ? atomic_add_8_nv ((uint8_t *)(v), (i)) : \
|
||||
sizeof(*v) == sizeof(uint16_t) ? atomic_add_16_nv((uint16_t *)(v), (i)) : \
|
||||
sizeof(*v) == sizeof(uint32_t) ? atomic_add_32_nv((uint32_t *)(v), (i)) : \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue