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