1 /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
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 <lttng/kernel-version.h>
14 #include <linux/file.h>
16 #if LTTNG_LINUX_VERSION_CODE >= LTTNG_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 LTTNG_LINUX_VERSION_CODE >= LTTNG_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 LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0) */
38 #endif /* _LTTNG_WRAPPER_FILE_H */
This page took 0.030379 seconds and 4 git commands to generate.