]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: threads: Add __ha_cas_dw fallback for single threaded builds
authorChris Packham <chris.packham@alliedtelesis.co.nz>
Thu, 9 May 2019 05:07:40 +0000 (17:07 +1200)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 May 2019 08:55:31 +0000 (10:55 +0200)
__ha_cas_dw() is used in fd_rm_from_fd_list() and when built without
USE_THREADS=1 the linker fails to find __ha_cas_dw(). Add a definition
of __ha_cas_dw() for the #ifndef USE_THREADS case.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
include/common/hathreads.h

index a19327e1059f5265e8817b4a925c467b4978dfb6..ef7ba7fa534b2146d787a6619ffd62093cc69fcf 100644 (file)
@@ -153,6 +153,11 @@ static inline void __ha_barrier_full(void)
 {
 }
 
+static inline int __ha_cas_dw(void *target, void *compare, void *set)
+{
+       return HA_ATOMIC_CAS(target, compare, set);
+}
+
 static inline void thread_harmless_now()
 {
 }