Backport: relayd: use the fd-tracker to track stream_fd fds
[lttng-tools.git] / src / bin / lttng-relayd / stream-fd.h
index 64f3b16a5f8d9ef2d7b3bd5191b8afdbe564d9a8..9e4dc80b435e83a641f250a508372634e1e728b4 100644 (file)
@@ -3,6 +3,7 @@
 
 /*
  * Copyright (C) 2015 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *               2018 - Jérémie Galarneau <jeremie.galarneau@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
  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include <urcu/ref.h>
+#include <stdint.h>
 
-struct stream_fd {
-       int fd;
-       struct urcu_ref ref;
-};
+struct stream_fd;
 
-struct stream_fd *stream_fd_create(int fd);
+struct stream_fd *stream_fd_open(const char *path);
+struct stream_fd *stream_fd_create(const char *path_name, const char *file_name,
+               uint64_t size, uint64_t count, const char *suffix);
+int stream_fd_rotate(struct stream_fd *sf, const char *path_name,
+               const char *file_name, uint64_t size,
+               uint64_t count, uint64_t *new_count);
 void stream_fd_get(struct stream_fd *sf);
 void stream_fd_put(struct stream_fd *sf);
+int stream_fd_get_fd(struct stream_fd *sf);
+void stream_fd_put_fd(struct stream_fd *sf);
 
 #endif /* _STREAM_FD_H */
This page took 0.024595 seconds and 5 git commands to generate.