527615af71f2af0cc4259fcaedec66c0e150d1a3
[lttng-modules.git] / wrapper / time.h
1 /* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
2 *
3 * wrapper/time.h
4 *
5 * Copyright (C) 2015 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 */
7
8 #ifndef _LTTNG_WRAPPER_TIME_H
9 #define _LTTNG_WRAPPER_TIME_H
10
11 #include <linux/version.h>
12 #include <linux/time.h>
13
14 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
15
16 static inline bool lttng_close_on_exec(int fd, const struct fdtable *fdt)
17 {
18 return close_on_exec(fd, fdt);
19 }
20
21 #else
22
23 static inline bool lttng_close_on_exec(int fd, const struct fdtable *fdt)
24 {
25 return FD_ISSET(fd, fdt->close_on_exec);
26 }
27
28 #endif
29
30 #endif /* _LTTNG_WRAPPER_TIME_H */
This page took 0.02914 seconds and 3 git commands to generate.