mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-28 15:42:30 +00:00
CLEANUP: haproxy/threads: don't check global_tasks_mask twice
In run_thread_poll_loop() we test both for (global_tasks_mask & tid_bit) and thread_has_tasks(), but the former is useless since this test is already part of the latter.
This commit is contained in:
parent
4f46a354e6
commit
95abd5be9f
@ -2819,7 +2819,7 @@ void run_poll_loop()
|
|||||||
else {
|
else {
|
||||||
_HA_ATOMIC_OR(&sleeping_thread_mask, tid_bit);
|
_HA_ATOMIC_OR(&sleeping_thread_mask, tid_bit);
|
||||||
__ha_barrier_atomic_store();
|
__ha_barrier_atomic_store();
|
||||||
if ((global_tasks_mask & tid_bit) || thread_has_tasks()) {
|
if (thread_has_tasks()) {
|
||||||
activity[tid].wake_tasks++;
|
activity[tid].wake_tasks++;
|
||||||
_HA_ATOMIC_AND(&sleeping_thread_mask, ~tid_bit);
|
_HA_ATOMIC_AND(&sleeping_thread_mask, ~tid_bit);
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user