GNU Linux-libre 4.14.332-gnu1
[releases.git] / arch / parisc / include / asm / spinlock_types.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_SPINLOCK_TYPES_H
3 #define __ASM_SPINLOCK_TYPES_H
4
5 typedef struct {
6         volatile unsigned int lock[4];
7 # define __ARCH_SPIN_LOCK_UNLOCKED      { { 1, 1, 1, 1 } }
8 } arch_spinlock_t;
9
10 typedef struct {
11         arch_spinlock_t lock;
12         volatile int counter;
13 } arch_rwlock_t;
14
15 #define __ARCH_RW_LOCK_UNLOCKED         { __ARCH_SPIN_LOCK_UNLOCKED, 0 }
16
17 #endif