1
2
3
4
5
6 #ifndef __ASM_SPINLOCK_TYPES_H
7 #define __ASM_SPINLOCK_TYPES_H
8
9 typedef struct {
10 volatile unsigned int slock;
11 } arch_spinlock_t;
12
13 #define __ARCH_SPIN_LOCK_UNLOCKED__ 0
14 #define __ARCH_SPIN_LOCK_LOCKED__ 1
15
16 #define __ARCH_SPIN_LOCK_UNLOCKED { __ARCH_SPIN_LOCK_UNLOCKED__ }
17 #define __ARCH_SPIN_LOCK_LOCKED { __ARCH_SPIN_LOCK_LOCKED__ }
18
19
20
21
22
23
24 typedef struct {
25 volatile unsigned int counter;
26 #ifndef CONFIG_ARC_HAS_LLSC
27 arch_spinlock_t lock_mutex;
28 #endif
29 } arch_rwlock_t;
30
31 #define __ARCH_RW_LOCK_UNLOCKED__ 0x01000000
32 #define __ARCH_RW_LOCK_UNLOCKED { .counter = __ARCH_RW_LOCK_UNLOCKED__ }
33
34 #endif