1 #ifndef _LTT_WRAPPER_SPINLOCK_H
2 #define _LTT_WRAPPER_SPINLOCK_H
5 * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com)
7 * Dual LGPL v2.1/GPL v2 license.
10 #include <linux/version.h>
12 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
14 #include <linux/string.h>
16 #define raw_spin_lock_init(lock) \
18 raw_spinlock_t __lock = __RAW_SPIN_LOCK_UNLOCKED; \
19 memcpy(lock, &__lock, sizeof(lock)); \
22 #define raw_spin_is_locked(lock) __raw_spin_is_locked(lock)
26 #endif /* _LTT_WRAPPER_SPINLOCK_H */