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 __LINUX_SPINLOCK_UP_H 13 #define __LINUX_SPINLOCK_UP_H 14 15 #ifndef __LINUX_SPINLOCK_H 16 #error "please don't include this file directly" 17 #endif 18 19 #define __raw_spin_is_locked(lock) ((void)(lock), 0) 20 21 #define __raw_spin_lock(lock) do { (void)(lock); } while (0) 22 #define __raw_spin_unlock(lock) do { (void)(lock); } while (0) 23 #define __raw_spin_trylock(lock) ({ (void)(lock); 1; }) 24 25 #define __raw_read_can_lock(lock) (((void)(lock), 1)) 26 #define __raw_write_can_lock(lock) (((void)(lock), 1)) 27 28 #define __raw_spin_unlock_wait(lock) do { cpu_relax(); } while (__raw_spin_is_locked(lock)) 29 30 #endif 31