Changeset 8aa9265 in mainline
- Timestamp:
- 2010-05-21T12:39:05Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7de7cde
- Parents:
- d0ee0de
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/synch/spinlock.h
rd0ee0de r8aa9265 184 184 185 185 typedef struct { 186 SPINLOCK_DECLARE(lock); 187 bool guard; 188 ipl_t ipl; 186 SPINLOCK_DECLARE(lock); /**< Spinlock */ 187 bool guard; /**< Flag whether ipl is valid */ 188 ipl_t ipl; /**< Original interrupt level */ 189 189 } irq_spinlock_t; 190 190 191 191 #define IRQ_SPINLOCK_DECLARE(lock_name) irq_spinlock_t lock_name 192 192 #define IRQ_SPINLOCK_EXTERN(lock_name) extern irq_spinlock_t lock_name 193 194 #ifdef CONFIG_SMP 193 195 194 196 #define ASSERT_IRQ_SPINLOCK(expr, irq_lock) \ … … 243 245 244 246 #endif /* CONFIG_DEBUG_SPINLOCK */ 247 248 #else /* CONFIG_SMP */ 249 250 /* 251 * Since the spinlocks are void on UP systems, we also need 252 * to have a special variant of interrupts-disabled spinlock 253 * macros which take this into account. 254 */ 255 256 #define ASSERT_IRQ_SPINLOCK(expr, irq_lock) \ 257 ASSERT_SPINLOCK(expr, NULL) 258 259 #define IRQ_SPINLOCK_INITIALIZE_NAME(lock_name, desc_name) \ 260 irq_spinlock_t lock_name = { \ 261 .guard = false, \ 262 .ipl = 0 \ 263 } 264 265 #define IRQ_SPINLOCK_STATIC_INITIALIZE_NAME(lock_name, desc_name) \ 266 static irq_spinlock_t lock_name = { \ 267 .guard = false, \ 268 .ipl = 0 \ 269 } 270 271 #endif /* CONFIG_SMP */ 245 272 246 273 #define IRQ_SPINLOCK_INITIALIZE(lock_name) \
Note:
See TracChangeset
for help on using the changeset viewer.