X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fpipe.h;h=1a1087c10e12ed1d4b8a6637a8c3f635e1530044;hp=11f41cf1543b7dfe03aed2cb866c49ee2d76dbd0;hb=9c2bd8db1c70269d37537b7d02bae41ccab29056;hpb=9fd926379bd4c6c17f2b3c39a5bbf9879bc74e14 diff --git a/src/common/pipe.h b/src/common/pipe.h index 11f41cf15..1a1087c10 100644 --- a/src/common/pipe.h +++ b/src/common/pipe.h @@ -19,6 +19,7 @@ #define LTTNG_PIPE_H #include +#include enum lttng_pipe_state { LTTNG_PIPE_STATE_OPENED = 1, @@ -72,14 +73,24 @@ static inline int lttng_pipe_get_writefd(struct lttng_pipe *pipe) return pipe->fd[1]; } +LTTNG_HIDDEN struct lttng_pipe *lttng_pipe_open(int flags); +LTTNG_HIDDEN +struct lttng_pipe *lttng_pipe_named_open(const char *path, mode_t mode, + int flags); +LTTNG_HIDDEN int lttng_pipe_write_close(struct lttng_pipe *pipe); +LTTNG_HIDDEN int lttng_pipe_read_close(struct lttng_pipe *pipe); /* Close both side of pipe. */ +LTTNG_HIDDEN int lttng_pipe_close(struct lttng_pipe *pipe); +LTTNG_HIDDEN void lttng_pipe_destroy(struct lttng_pipe *pipe); +LTTNG_HIDDEN ssize_t lttng_pipe_read(struct lttng_pipe *pipe, void *buf, size_t count); +LTTNG_HIDDEN ssize_t lttng_pipe_write(struct lttng_pipe *pipe, const void *buf, size_t count);