mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 07:07:04 +02:00
BUILD: atomics: fix build issue on non-x86/non-arm systems
Commit f435a2e518
("CLEANUP: atomics: also replace __sync_synchronize()
with __atomic_thread_fence()") replaced the builtins used for barriers,
but the different API required an argument while the macros didn't specify
any, resulting in double parenthesis that were causing obscure build errors
such as "called object type 'void' is not a function or function pointer".
Let's just specify the args for the macro. No backport is needed.
This commit is contained in:
parent
ab4cd49c04
commit
f01ff2478f
@ -685,12 +685,12 @@ static __inline int __ha_cas_dw(void *target, void *compare, void *set)
|
||||
|
||||
#else /* unknown / unhandled architecture, fall back to generic barriers */
|
||||
|
||||
#define __ha_barrier_atomic_load __atomic_thread_fence(__ATOMIC_ACQUIRE)
|
||||
#define __ha_barrier_atomic_store __atomic_thread_fence(__ATOMIC_RELEASE)
|
||||
#define __ha_barrier_atomic_full __atomic_thread_fence(__ATOMIC_SEQ_CST)
|
||||
#define __ha_barrier_load __atomic_thread_fence(__ATOMIC_ACQUIRE)
|
||||
#define __ha_barrier_store __atomic_thread_fence(__ATOMIC_RELEASE)
|
||||
#define __ha_barrier_full __atomic_thread_fence(__ATOMIC_SEQ_CST)
|
||||
#define __ha_barrier_atomic_load() __atomic_thread_fence(__ATOMIC_ACQUIRE)
|
||||
#define __ha_barrier_atomic_store() __atomic_thread_fence(__ATOMIC_RELEASE)
|
||||
#define __ha_barrier_atomic_full() __atomic_thread_fence(__ATOMIC_SEQ_CST)
|
||||
#define __ha_barrier_load() __atomic_thread_fence(__ATOMIC_ACQUIRE)
|
||||
#define __ha_barrier_store() __atomic_thread_fence(__ATOMIC_RELEASE)
|
||||
#define __ha_barrier_full() __atomic_thread_fence(__ATOMIC_SEQ_CST)
|
||||
|
||||
/* Note: there is no generic DWCAS */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user