2 * default_pipe_size_getter.c
4 * Tests suite for LTTng notification API (get default size of pipes)
6 * Copyright (C) 2021 Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 * SPDX-License-Identifier: MIT
16 #include <common/error.hpp>
17 #include <common/pipe.hpp>
24 int lttng_opt_verbose
;
31 * Return the default pipe buffer size or a negative error.
37 * The event notifier pipes are not "special"; they are created using
38 * the lttng_pipe utility. Hence, this should be representative of a
39 * pipe created by the session daemon for event notifier messages to
42 struct lttng_pipe
*pipe
= lttng_pipe_open(0);
45 /* lttng_pipe_open already logs on error. */
50 ret
= fcntl(lttng_pipe_get_writefd(pipe
), F_GETPIPE_SZ
);
52 PERROR("Failed to get the size of the pipe");
55 lttng_pipe_destroy(pipe
);
59 #elif defined(__FreeBSD__)
60 int get_pipe_size(void)
65 #error "Implement get_pipe_size() for your platform."
73 ret
= get_pipe_size();
78 /* Print the pipe buffer size to stdout. */
This page took 0.030723 seconds and 4 git commands to generate.