bin: compile lttng-sessiond as C++
[lttng-tools.git] / src / common / pipe.h
index 01fe8824244184a0843b1f1df914ad02136b9167..b94d871e48426d57d9c88bc419bb659f46babebc 100644 (file)
@@ -1,18 +1,8 @@
 /*
- * Copyright (C) 2013 David Goulet <dgoulet@efficios.com>
+ * Copyright (C) 2013 David Goulet <dgoulet@efficios.com>
  *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License, version 2 only, as
- * published by the Free Software Foundation.
+ * SPDX-License-Identifier: GPL-2.0-only
  *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #ifndef LTTNG_PIPE_H
 #include <common/macros.h>
 #include <sys/types.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 enum lttng_pipe_state {
        LTTNG_PIPE_STATE_OPENED = 1,
        LTTNG_PIPE_STATE_CLOSED = 2,
@@ -74,31 +68,25 @@ static inline int lttng_pipe_get_writefd(const 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);
 /* Returns and releases the read end of the pipe. */
-LTTNG_HIDDEN
 int lttng_pipe_release_readfd(struct lttng_pipe *pipe);
 /* Returns and releases the write end of the pipe. */
-LTTNG_HIDDEN
 int lttng_pipe_release_writefd(struct lttng_pipe *pipe);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LTTNG_PIPE_H */
This page took 0.024025 seconds and 4 git commands to generate.