From: Mathieu Desnoyers Date: Sun, 18 Nov 2012 15:31:35 +0000 (-0500) Subject: wfcqueue: enqueue and splice return queue state X-Git-Tag: v0.8.0~151 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=23773356a9fd12bf12627df437d0c7bd20e8ef01;hp=23773356a9fd12bf12627df437d0c7bd20e8ef01;p=userspace-rcu.git 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 CC: Paul E. McKenney CC: Lai Jiangshan ---