]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: tasks: Use the local runqueue when building without threads.
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 6 Jun 2018 12:01:08 +0000 (14:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 6 Jun 2018 14:34:52 +0000 (16:34 +0200)
When building without threads enabled, instead of just using the global
runqueue, just use the local runqueue associated with the only thread, as
that's what is now expected for a single thread in prcoess_runnable_tasks().
This should fix haproxy when built without threads.

include/proto/task.h

index 0c2c5f28cb3a4603aeb9176ca41df986f9cded14..dc8a54481fa600ec79e4005185702d2582af1c60 100644 (file)
@@ -133,7 +133,7 @@ static inline void task_wakeup(struct task *t, unsigned int f)
        else
                root = &rqueue;
 #else
-       struct eb_root *root = &rqueue;
+       struct eb_root *root = &rqueue_local[tid];
 #endif
 
        state = HA_ATOMIC_OR(&t->state, f);