Changeset 4777e02 in mainline for kernel/generic/include/synch/spinlock.h
- Timestamp:
- 2023-02-12T22:25:23Z (15 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c7326f21
- Parents:
- 111b9b9
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2023-02-12 22:11:54)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2023-02-12 22:25:23)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/synch/spinlock.h
r111b9b9 r4777e02 117 117 SPINLOCK_STATIC_INITIALIZE_NAME(lock_name, #lock_name) 118 118 119 #ifdef CONFIG_SMP 120 119 121 extern void spinlock_initialize(spinlock_t *, const char *); 120 122 extern bool spinlock_trylock(spinlock_t *); … … 122 124 extern void spinlock_unlock(spinlock_t *); 123 125 extern bool spinlock_locked(spinlock_t *); 126 127 #else 128 129 #include <preemption.h> 130 131 static inline void spinlock_initialize(spinlock_t *l, const char *name) 132 { 133 } 134 135 static inline bool spinlock_trylock(spinlock_t *l) 136 { 137 return true; 138 } 139 140 static inline void spinlock_lock(spinlock_t *l) 141 { 142 preemption_disable(); 143 } 144 145 static inline void spinlock_unlock(spinlock_t *l) 146 { 147 preemption_enable(); 148 } 149 150 static inline bool spinlock_locked(spinlock_t *l) 151 { 152 return true; 153 } 154 155 #endif 124 156 125 157 typedef struct {
Note:
See TracChangeset
for help on using the changeset viewer.