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)
commitacdb9057878ddbd9c112206f3c1c4c2104093088
tree9dae06c0b67ab644990b06089e12916f4c608ecb
parent9fd926379bd4c6c17f2b3c39a5bbf9879bc74e14
Change consumer_data_pipe to be a lttng_pipe

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>
src/common/consumer.c
src/common/consumer.h
src/common/kernel-consumer/kernel-consumer.c
src/common/ust-consumer/ust-consumer.c
This page took 0.027379 seconds and 5 git commands to generate.