Ignore:
File:
1 edited

Legend:

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

    rcc106e4 r9d58539  
    4545#ifdef CONFIG_SMP
    4646
    47 typedef struct spinlock {
     47typedef struct {
    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. */
    165 typedef struct spinlock spinlock_t;
    166 
    167164#define SPINLOCK_DECLARE(name)
    168165#define SPINLOCK_EXTERN(name)
     
    179176
    180177#define spinlock_lock(lock)     preemption_disable()
    181 #define spinlock_trylock(lock)  ({ preemption_disable(); 1; })
     178#define spinlock_trylock(lock)  (preemption_disable(), 1)
    182179#define spinlock_unlock(lock)   preemption_enable()
    183180#define spinlock_locked(lock)   1
Note: See TracChangeset for help on using the changeset viewer.