Mass rename: ltt_*/ltt-* to LTTNG_*/LTTNG-*
[lttng-modules.git] / wrapper / spinlock.h
1 #ifndef _LTTNG_WRAPPER_SPINLOCK_H
2 #define _LTTNG_WRAPPER_SPINLOCK_H
3
4 /*
5 * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com)
6 *
7 * Dual LGPL v2.1/GPL v2 license.
8 */
9
10 #include <linux/version.h>
11
12 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
13
14 #include <linux/string.h>
15
16 #define raw_spin_lock_init(lock) \
17 do { \
18 raw_spinlock_t __lock = __RAW_SPIN_LOCK_UNLOCKED; \
19 memcpy(lock, &__lock, sizeof(lock)); \
20 } while (0)
21
22 #define raw_spin_is_locked(lock) __raw_spin_is_locked(lock)
23
24
25 #endif
26 #endif /* _LTTNG_WRAPPER_SPINLOCK_H */
This page took 0.029318 seconds and 4 git commands to generate.