Fix: data pending: allow empty streams
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 5 Jan 2015 02:25:08 +0000 (21:25 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 8 Jan 2015 17:27:43 +0000 (12:27 -0500)
commit3bd9b05c09342cbc5cfc1df0d048876939258d6d
tree69b9b57c3b50153ed21ae1d126f16c35453a07cf
parent31597293bbddd1d436bf7b21575a62b653767218
Fix: data pending: allow empty streams

There are cases where a stream can be completely empty (no packet to
write) with UST: for instance, if a traced application is either
preempted for a long time, terminated, or stopped, between reserve and
commit. This will make the consumer consider that this stream has no
data ready. If this situation occurs in the first sub-buffer of a
stream, this stream will have no data at all (0 bytes).

Therefore, we need to let the data pending check consider that no data
is pending in this situation, otherwise it can make the data pending
check always return that there is data pending.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/consumer.c
This page took 0.026892 seconds and 4 git commands to generate.