Add wrappers for pipe
authorDavid Goulet <dgoulet@efficios.com>
Fri, 10 May 2013 16:02:37 +0000 (12:02 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Fri, 17 May 2013 18:11:26 +0000 (14:11 -0400)
This is to help use pipes in a way where partial read/write and EINTR
are handled in one single call site.

Two new files are created, pipe.c/.h which are part of libcommon. The
open, close, read_close, write_close, read and write calls are
implemented using a custom lttng_pipe data structure and protected by
operation's mutex. A destroy function is also available to cleanup
memory once done with a pipe.

The motivation behind this patch is for some upcoming fixes that deals
with a race condition between read and write on a pipe in the consumer.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>

No differences found
This page took 0.024616 seconds and 4 git commands to generate.