Change consumer_data_pipe to be a lttng_pipe
authorDavid Goulet <dgoulet@efficios.com>
Tue, 14 May 2013 15:00:22 +0000 (11:00 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Wed, 22 May 2013 14:37:21 +0000 (10:37 -0400)
Also, an important change here is that this pipe is no longer in non
block mode. Before sending stream's pointer over this pipe, only one
byte was written thus making it unlikely to fail in a read/write race
condition between threads. Now, 4 bytes are written so keeping this pipe
non block with threads is a bit of a "looking for trouble situation".

The lttng pipe wrappers make sure that the read and write side are
synchronized between threads using a mutex for each side. Furthermore,
the read and write handle partial I/O and EINTR meaning that once the
call returns we are sure that either everything was read/written or an
error occured thus making it not possible for the read side to block
indefinitely after a poll event.

Fixes #475

Signed-off-by: David Goulet <dgoulet@efficios.com>

No differences found
This page took 0.028139 seconds and 5 git commands to generate.