1 #ifndef SPINLOCK_H_STUB
2 #define SPINLOCK_H_STUB
6 typedef pthread_spinlock_t spinlock_t;
8 static inline void spin_lock_init(spinlock_t *lock)
10 int r = pthread_spin_init(lock, 0);
14 static inline void spin_lock(spinlock_t *lock)
16 int ret = pthread_spin_lock(lock);
20 static inline void spin_unlock(spinlock_t *lock)
22 int ret = pthread_spin_unlock(lock);
26 static inline void spin_lock_bh(spinlock_t *lock)
31 static inline void spin_unlock_bh(spinlock_t *lock)
36 static inline void spin_lock_irq(spinlock_t *lock)
41 static inline void spin_unlock_irq(spinlock_t *lock)
46 static inline void spin_lock_irqsave(spinlock_t *lock, unsigned long f)
51 static inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long f)