Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/synch/spinlock.h

    r9d58539 rcc106e4  
    4545#ifdef CONFIG_SMP
    4646
    47 typedef struct {
     47typedef struct spinlock {
    4848        atomic_t val;
    4949       
     
    162162/* On UP systems, spinlocks are effectively left out. */
    163163
     164/* Allow the use of spinlock_t as an incomplete type. */
     165typedef struct spinlock spinlock_t;
     166
    164167#define SPINLOCK_DECLARE(name)
    165168#define SPINLOCK_EXTERN(name)
     
    176179
    177180#define spinlock_lock(lock)     preemption_disable()
    178 #define spinlock_trylock(lock)  (preemption_disable(), 1)
     181#define spinlock_trylock(lock)  ({ preemption_disable(); 1; })
    179182#define spinlock_unlock(lock)   preemption_enable()
    180183#define spinlock_locked(lock)   1
Note: See TracChangeset for help on using the changeset viewer.