staging: remove intel_sst driver
[zen-stable.git] / drivers / staging / lttng / wrapper / spinlock.h
blob8b1ad992559590a31c0be4ce3e8476bdd510f020
1 #ifndef _LTT_WRAPPER_SPINLOCK_H
2 #define _LTT_WRAPPER_SPINLOCK_H
4 /*
5 * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com)
7 * Dual LGPL v2.1/GPL v2 license.
8 */
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) \
17 do { \
18 raw_spinlock_t __lock = __RAW_SPIN_LOCK_UNLOCKED; \
19 memcpy(lock, &__lock, sizeof(lock)); \
20 } while (0)
22 #define raw_spin_is_locked(lock) __raw_spin_is_locked(lock)
25 #endif
26 #endif /* _LTT_WRAPPER_SPINLOCK_H */