1 /* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
5 * wrapper around linux/file.h.
7 * Copyright (C) 2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 #ifndef _LTTNG_WRAPPER_FILE_H
11 #define _LTTNG_WRAPPER_FILE_H
13 #include <linux/version.h>
14 #include <linux/file.h>
16 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
19 inline int lttng_get_unused_fd(void)
21 return get_unused_fd_flags(0);
24 #define lttng_f_dentry f_path.dentry
26 #else /* #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) */
29 inline int lttng_get_unused_fd(void)
31 return get_unused_fd();
34 #define lttng_f_dentry f_dentry
36 #endif /* #else #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) */
38 #endif /* _LTTNG_WRAPPER_FILE_H */
This page took 0.030412 seconds and 4 git commands to generate.