Changes in kernel/generic/include/synch/spinlock.h [9d58539:cc106e4] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/synch/spinlock.h
r9d58539 rcc106e4 45 45 #ifdef CONFIG_SMP 46 46 47 typedef struct {47 typedef struct spinlock { 48 48 atomic_t val; 49 49 … … 162 162 /* On UP systems, spinlocks are effectively left out. */ 163 163 164 /* Allow the use of spinlock_t as an incomplete type. */ 165 typedef struct spinlock spinlock_t; 166 164 167 #define SPINLOCK_DECLARE(name) 165 168 #define SPINLOCK_EXTERN(name) … … 176 179 177 180 #define spinlock_lock(lock) preemption_disable() 178 #define spinlock_trylock(lock) ( preemption_disable(), 1)181 #define spinlock_trylock(lock) ({ preemption_disable(); 1; }) 179 182 #define spinlock_unlock(lock) preemption_enable() 180 183 #define spinlock_locked(lock) 1
Note:
See TracChangeset
for help on using the changeset viewer.