1 /* $OpenBSD: spinlock.h,v 1.4 2013/06/01 20:47:40 tedu Exp $ */ 2 3 #ifndef _MACHINE_SPINLOCK_H_ 4 #define _MACHINE_SPINLOCK_H_ 5 6 #define _ATOMIC_LOCK_UNLOCKED (1) 7 #define _ATOMIC_LOCK_LOCKED (0) 8 typedef long _atomic_lock_t __attribute__((__aligned__(16))); 9 10 #ifndef _KERNEL 11 int _atomic_lock(volatile _atomic_lock_t *); 12 #endif 13 14 #endif 15