1 /* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
5 * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 #ifndef _LTTNG_WRAPPER_SPINLOCK_H
9 #define _LTTNG_WRAPPER_SPINLOCK_H
11 #include <linux/version.h>
13 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
15 #include <linux/string.h>
17 #define raw_spin_lock_init(lock) \
19 raw_spinlock_t __lock = __RAW_SPIN_LOCK_UNLOCKED; \
20 memcpy(lock, &__lock, sizeof(lock)); \
23 #define raw_spin_is_locked(lock) __raw_spin_is_locked(lock)
25 #define wrapper_desc_spin_lock(lock) spin_lock(lock)
26 #define wrapper_desc_spin_unlock(lock) spin_unlock(lock)
30 #define wrapper_desc_spin_lock(lock) raw_spin_lock(lock)
31 #define wrapper_desc_spin_unlock(lock) raw_spin_unlock(lock)
34 #endif /* _LTTNG_WRAPPER_SPINLOCK_H */
This page took 0.030309 seconds and 4 git commands to generate.