Add the rt linux 4.1.3-rt3 as base
[kvmfornfv.git] / kernel / tools / lib / lockdep / uinclude / linux / spinlock.h
1 #ifndef _LIBLOCKDEP_SPINLOCK_H_
2 #define _LIBLOCKDEP_SPINLOCK_H_
3
4 #include <pthread.h>
5 #include <stdbool.h>
6
7 #define arch_spinlock_t pthread_mutex_t
8 #define __ARCH_SPIN_LOCK_UNLOCKED PTHREAD_MUTEX_INITIALIZER
9
10 static inline void arch_spin_lock(arch_spinlock_t *mutex)
11 {
12         pthread_mutex_lock(mutex);
13 }
14
15 static inline void arch_spin_unlock(arch_spinlock_t *mutex)
16 {
17         pthread_mutex_unlock(mutex);
18 }
19
20 static inline bool arch_spin_is_locked(arch_spinlock_t *mutex)
21 {
22         return true;
23 }
24
25 #endif