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