Le 24/03/2018 à 13:19, Илья Шипицин a écrit :
please review attached patch

Good catch. But instead of using #ifdef in queue.c, there are macros in hathreads.h. Here is the updated patch.

Thanks,
--
Christopher Faulet
>From fa07c58b33524caa8d059dfd0ed741f4b2eb4637 Mon Sep 17 00:00:00 2001
From: Ilya Shipitsin <[email protected]>
Date: Sat, 24 Mar 2018 17:17:32 +0500
Subject: [PATCH] MINOR: fix build when USE_THREAD is not defined

src/queue.o: In function `pendconn_redistribute':
/home/ilia/haproxy/src/queue.c:272: undefined reference to `thread_want_sync'
src/queue.o: In function `pendconn_grab_from_px':
/home/ilia/haproxy/src/queue.c:311: undefined reference to `thread_want_sync'
src/queue.o: In function `process_srv_queue':
/home/ilia/haproxy/src/queue.c:184: undefined reference to `thread_want_sync'
collect2: error: ld returned 1 exit status
make: *** [Makefile:900: haproxy] Error 1
---
 src/queue.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/queue.c b/src/queue.c
index 7cad813b..1c730c75 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -181,7 +181,7 @@ void process_srv_queue(struct server *s)
 	HA_SPIN_UNLOCK(PROXY_LOCK,  &p->lock);
 
 	if (remote)
-		thread_want_sync();
+		THREAD_WANT_SYNC();
 }
 
 /* Adds the stream <strm> to the pending connection list of server <strm>->srv
@@ -269,8 +269,7 @@ int pendconn_redistribute(struct server *s)
 	HA_SPIN_UNLOCK(SERVER_LOCK, &s->lock);
 
 	if (remote)
-		thread_want_sync();
-
+		THREAD_WANT_SYNC();
 	return xferred;
 }
 
@@ -308,8 +307,7 @@ int pendconn_grab_from_px(struct server *s)
 	HA_SPIN_UNLOCK(PROXY_LOCK, &s->proxy->lock);
 
 	if (remote)
-		thread_want_sync();
-
+		THREAD_WANT_SYNC();
 	return xferred;
 }
 
-- 
2.14.3

Reply via email to