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 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef __LINUX_SPINLOCK_TYPES_H 20 #define __LINUX_SPINLOCK_TYPES_H 21 #include <linux/lockdep.h> 22 #include <linux/spinlock_types_up.h> 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 typedef struct { 25 raw_spinlock_t raw_lock; 26 } spinlock_t; 27 #define SPINLOCK_MAGIC 0xdead4ead 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 typedef struct { 30 raw_rwlock_t raw_lock; 31 } rwlock_t; 32 #define RWLOCK_MAGIC 0xdeaf1eed 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 #define SPINLOCK_OWNER_INIT ((void *)-1L) 35 #define SPIN_DEP_MAP_INIT(lockname) 36 #define RW_DEP_MAP_INIT(lockname) 37 #define __SPIN_LOCK_UNLOCKED(lockname) (spinlock_t) { .raw_lock = __RAW_SPIN_LOCK_UNLOCKED, SPIN_DEP_MAP_INIT(lockname) } 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 #define __RW_LOCK_UNLOCKED(lockname) (rwlock_t) { .raw_lock = __RAW_RW_LOCK_UNLOCKED, RW_DEP_MAP_INIT(lockname) } 40 #define SPIN_LOCK_UNLOCKED __SPIN_LOCK_UNLOCKED(old_style_spin_init) 41 #define RW_LOCK_UNLOCKED __RW_LOCK_UNLOCKED(old_style_rw_init) 42 #define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x) 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 #define DEFINE_RWLOCK(x) rwlock_t x = __RW_LOCK_UNLOCKED(x) 45 #endif 46