1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 **************************************************************************** 11 ****************************************************************************/ 12 #ifndef __ASM_SH_SPINLOCK_H 13 #define __ASM_SH_SPINLOCK_H 14 15 #define __raw_spin_is_locked(x) ((x)->lock <= 0) 16 #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) 17 #define __raw_spin_unlock_wait(x) do { cpu_relax(); } while ((x)->lock) 18 19 #define __raw_read_can_lock(x) ((x)->lock > 0) 20 #define __raw_write_can_lock(x) ((x)->lock == RW_LOCK_BIAS) 21 #define _raw_spin_relax(lock) cpu_relax() 22 #define _raw_read_relax(lock) cpu_relax() 23 #define _raw_write_relax(lock) cpu_relax() 24 #endif 25