Sync ax_have_epoll.m4 with autoconf-archive
[lttng-tools.git] / src / common / fs-handle-internal.h
1 /*
2 * Copyright (C) 2020 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
3 *
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published by the
6 * Free Software Foundation; version 2.1 of the License.
7 *
8 * This library is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11 * for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17
18 #ifndef FS_HANDLE_INTERNAL_H
19 #define FS_HANDLE_INTERNAL_H
20
21 struct fs_handle;
22
23 /*
24 * Multiple internal APIs return fs_handles. For the moment, this internal
25 * interface allows the use of different fs_handle implementations in different
26 * daemons. For instance, the trace chunk interface returns fs_handles that
27 * behave diffently depending on whether or not the trace chunk was configured
28 * to use an fd-tracker.
29 */
30
31 typedef int (*fs_handle_get_fd_cb)(struct fs_handle *);
32 typedef void (*fs_handle_put_fd_cb)(struct fs_handle *);
33 typedef int (*fs_handle_unlink_cb)(struct fs_handle *);
34 typedef int (*fs_handle_close_cb)(struct fs_handle *);
35
36 struct fs_handle {
37 fs_handle_get_fd_cb get_fd;
38 fs_handle_put_fd_cb put_fd;
39 fs_handle_unlink_cb unlink;
40 fs_handle_close_cb close;
41 };
42
43 #endif /* FS_HANDLE_INTERNAL_H */
This page took 0.029508 seconds and 4 git commands to generate.