fff8b1df28625a46355c9a626928a54826161a17
[lttng-modules.git] / wrapper / percpu-defs.h
1 /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
2 *
3 * wrapper/percpu-defs.h
4 *
5 * wrapper around linux/percpu-defs.h.
6 *
7 * Copyright (C) 2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 */
9
10 #ifndef _LTTNG_WRAPPER_PERCPU_DEFS_H
11 #define _LTTNG_WRAPPER_PERCPU_DEFS_H
12
13 #include <linux/version.h>
14
15 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
16
17 #include <linux/percpu-defs.h>
18
19 #define lttng_this_cpu_ptr(ptr) this_cpu_ptr(ptr)
20
21 #else /* #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) */
22
23 #include <linux/percpu.h>
24
25 #define lttng_this_cpu_ptr(ptr) (&__get_cpu_var(*(ptr)))
26
27 #endif /* #else #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) */
28
29 #endif /* _LTTNG_WRAPPER_PERCPU_DEFS_H */
This page took 0.029655 seconds and 3 git commands to generate.