waitqueue: add in_waitqueue field urcu/workqueue-wakeup
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 24 Oct 2014 11:26:55 +0000 (07:26 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 24 Oct 2014 11:26:55 +0000 (07:26 -0400)
commitaa46e09faad0962ef1b782c0e564d8d674d51160
tree0c0bd4d5de0c350129740e406e18867d8ab82a18
parentb19099feed421e7f4c97b207f0f7779c5eae5b52
waitqueue: add in_waitqueue field

Using the waitqueue node next pointer to figure out if the node is
within the queue worked when wfstack was used to implement the queue
stack, but unfortunately it does not keep the same semantic with
lfstack: indeed, the bottom of stack is indicated by a NULL pointer too.

Keep this state in a separate field instead to eliminate coupling
between workqueue, waitqueue and lfstack.

Note that it is OK for a worker to see "in_waitqueue" as temporarily
false when the wait node has just been pop'd from the waitqueue. It's
the opposite that we never want to happen: a worker should never see
"in_waitqueue" as false when the node is actually in the waitqueue,
because it would cause queue corruption.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu/waitqueue-lifo.h
urcu/workqueue-fifo.h
This page took 0.025232 seconds and 4 git commands to generate.