Commit | Line | Data |
---|---|---|
6548fca4 MD |
1 | #ifndef _LTTNG_UST_FD_H |
2 | #define _LTTNG_UST_FD_H | |
3 | ||
4 | /* | |
5 | * Copyright (C) 2016 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
6 | * | |
7 | * This library is free software; you can redistribute it and/or | |
8 | * modify it under the terms of the GNU Lesser General Public | |
9 | * License as published by the Free Software Foundation; only | |
10 | * version 2.1 of the License. | |
11 | * | |
12 | * This library is distributed in the hope that it will be useful, | |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | * Lesser General Public License for more details. | |
16 | * | |
17 | * You should have received a copy of the GNU Lesser General Public | |
18 | * License along with this library; if not, write to the Free Software | |
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
20 | */ | |
21 | ||
22 | /* | |
23 | * This header is meant for liblttng and libust internal use ONLY. | |
24 | * These declarations should NOT be considered stable API. | |
25 | */ | |
26 | ||
52a20dc7 MD |
27 | #include <stdio.h> |
28 | ||
6548fca4 | 29 | void lttng_ust_init_fd_tracker(void); |
f5c453e9 | 30 | int lttng_ust_add_fd_to_tracker(int fd); |
6548fca4 MD |
31 | void lttng_ust_delete_fd_from_tracker(int fd); |
32 | void lttng_ust_lock_fd_tracker(void); | |
33 | void lttng_ust_unlock_fd_tracker(void); | |
34 | ||
35 | int lttng_ust_safe_close_fd(int fd, int (*close_cb)(int)); | |
52a20dc7 | 36 | int lttng_ust_safe_fclose_stream(FILE *stream, int (*fclose_cb)(FILE *stream)); |
6548fca4 MD |
37 | int lttng_ust_safe_closefrom_fd(int lowfd, int (*close_cb)(int)); |
38 | ||
39 | #endif /* _LTTNG_UST_FD_H */ |