xref: /linux/arch/parisc/include/asm/spinlock_types.h (revision 44f57d78)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_SPINLOCK_TYPES_H
3 #define __ASM_SPINLOCK_TYPES_H
4 
5 typedef struct {
6 #ifdef CONFIG_PA20
7 	volatile unsigned int slock;
8 # define __ARCH_SPIN_LOCK_UNLOCKED { 1 }
9 #else
10 	volatile unsigned int lock[4];
11 # define __ARCH_SPIN_LOCK_UNLOCKED	{ { 1, 1, 1, 1 } }
12 #endif
13 } arch_spinlock_t;
14 
15 typedef struct {
16 	arch_spinlock_t lock;
17 	volatile int counter;
18 } arch_rwlock_t;
19 
20 #define __ARCH_RW_LOCK_UNLOCKED		{ __ARCH_SPIN_LOCK_UNLOCKED, 0 }
21 
22 #endif
23