1 /* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
3 * wrapper/percpu-defs.h
5 * wrapper around linux/percpu-defs.h.
7 * Copyright (C) 2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 #ifndef _LTTNG_WRAPPER_PERCPU_DEFS_H
11 #define _LTTNG_WRAPPER_PERCPU_DEFS_H
13 #include <linux/version.h>
15 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
17 #include <linux/percpu-defs.h>
19 #define lttng_this_cpu_ptr(ptr) this_cpu_ptr(ptr)
21 #else /* #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) */
23 #include <linux/percpu.h>
25 #define lttng_this_cpu_ptr(ptr) (&__get_cpu_var(*(ptr)))
27 #endif /* #else #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) */
29 #endif /* _LTTNG_WRAPPER_PERCPU_DEFS_H */
This page took 0.034182 seconds and 4 git commands to generate.