1 /* SPDX-License-Identifier: GPL-2.0 */ 2 3 #ifndef __ASM_CSKY_SPINLOCK_TYPES_H 4 #define __ASM_CSKY_SPINLOCK_TYPES_H 5 6 #ifndef __LINUX_SPINLOCK_TYPES_H 7 # error "please don't include this file directly" 8 #endif 9 10 #define TICKET_NEXT 16 11 12 typedef struct { 13 union { 14 u32 lock; 15 struct __raw_tickets { 16 /* little endian */ 17 u16 owner; 18 u16 next; 19 } tickets; 20 }; 21 } arch_spinlock_t; 22 23 #define __ARCH_SPIN_LOCK_UNLOCKED { { 0 } } 24 25 #include <asm-generic/qrwlock_types.h> 26 27 #endif /* __ASM_CSKY_SPINLOCK_TYPES_H */ 28