wfcqueue: enqueue and splice return queue state
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 18 Nov 2012 15:31:35 +0000 (10:31 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 5 Dec 2012 10:48:00 +0000 (05:48 -0500)
commit23773356a9fd12bf12627df437d0c7bd20e8ef01
tree1912ffbcbc8938888b88405b51f59d46b53e180e
parentdfb65fd3cc75f660f35feedd2e14b000dbe39a4b
wfcqueue: enqueue and splice return queue state

enqueue can return whether the queue was empty or not prior to enqueue.

splice can return this information about destination queue too, but
there are more cases to handle, because we don't touch the destination
queue if the source queue was empty, and in the nonblocking case, we
return that we would need to block on the source queue.

The destination queue state is sampled atomically with enqueue/splice to
destination operations.

Knowing this state is useful when "ownership" on a batch of queue items
can be assigned to those enqueuing the first items, e.g. to implement
wait/wakeup schemes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
CC: Lai Jiangshan <laijs@cn.fujitsu.com>
urcu/static/wfcqueue.h
urcu/wfcqueue.h
wfcqueue.c
This page took 0.025242 seconds and 4 git commands to generate.