]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MAJOR: task: task scheduler rework.
authorEmeric Brun <ebrun@haproxy.com>
Thu, 30 Mar 2017 13:37:25 +0000 (15:37 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 27 Jun 2017 12:38:02 +0000 (14:38 +0200)
commit0194897e540cec67d7d1e9281648b70efe403f08
treeb51652897ad891299ff061a7130bd0aca34fbb0b
parentff4491726f2879ea0ddd69f5c735058938b78476
MAJOR: task: task scheduler rework.

In order to authorize call of task_wakeup on running task:
- from within the task handler itself.
- in futur, from another thread.

The lookups on runqueue and waitqueue are re-worked
to prepare multithread stuff.

If task_wakeup is called on a running task, the woken
message flags are savec in the 'pending_state' attribute of
the state. The real wakeup is postponed at the end of the handler
process and the woken messages are copied from pending_state
to the state attribute of the task.

It's important to note that this change will cause a very minor
(though measurable) performance loss but it is necessary to make
forward progress on a multi-threaded scheduler. Most users won't
ever notice.
include/proto/task.h
include/types/task.h
src/task.c