]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
fb1c8f93 IM |
2 | #ifndef __ASM_SPINLOCK_TYPES_H |
3 | #define __ASM_SPINLOCK_TYPES_H | |
4 | ||
5 | #ifndef __LINUX_SPINLOCK_TYPES_H | |
6 | # error "please don't include this file directly" | |
7 | #endif | |
8 | ||
546c2896 WD |
9 | #define TICKET_SHIFT 16 |
10 | ||
fb1c8f93 | 11 | typedef struct { |
546c2896 WD |
12 | union { |
13 | u32 slock; | |
14 | struct __raw_tickets { | |
15 | #ifdef __ARMEB__ | |
16 | u16 next; | |
17 | u16 owner; | |
18 | #else | |
19 | u16 owner; | |
20 | u16 next; | |
21 | #endif | |
22 | } tickets; | |
23 | }; | |
445c8951 | 24 | } arch_spinlock_t; |
fb1c8f93 | 25 | |
546c2896 | 26 | #define __ARCH_SPIN_LOCK_UNLOCKED { { 0 } } |
fb1c8f93 IM |
27 | |
28 | typedef struct { | |
9bb17be0 | 29 | u32 lock; |
fb3a6bbc | 30 | } arch_rwlock_t; |
fb1c8f93 | 31 | |
fb3a6bbc | 32 | #define __ARCH_RW_LOCK_UNLOCKED { 0 } |
fb1c8f93 IM |
33 | |
34 | #endif |