Ignore:
File:
1 edited

Legend:

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

    rcc106e4 rb2fa1204  
    4545#ifdef CONFIG_SMP
    4646
    47 typedef struct spinlock {
     47typedef struct {
    4848        atomic_t val;
    4949       
     
    137137#ifdef CONFIG_DEBUG_SPINLOCK
    138138
    139 #include <print.h>
     139#include <log.h>
    140140
    141141#define DEADLOCK_THRESHOLD  100000000
     
    146146        if ((pname)++ > (value)) { \
    147147                (pname) = 0; \
    148                 printf("Deadlock probe %s: exceeded threshold %u\n" \
     148                log(LF_OTHER, LVL_WARN, \
     149                    "Deadlock probe %s: exceeded threshold %u\n" \
    149150                    "cpu%u: function=%s, line=%u\n", \
    150151                    #pname, (value), CPU->id, __func__, __LINE__); \
     
    162163/* On UP systems, spinlocks are effectively left out. */
    163164
    164 /* Allow the use of spinlock_t as an incomplete type. */
    165 typedef struct spinlock spinlock_t;
    166 
    167165#define SPINLOCK_DECLARE(name)
    168166#define SPINLOCK_EXTERN(name)
     
    179177
    180178#define spinlock_lock(lock)     preemption_disable()
    181 #define spinlock_trylock(lock)  ({ preemption_disable(); 1; })
     179#define spinlock_trylock(lock)  (preemption_disable(), 1)
    182180#define spinlock_unlock(lock)   preemption_enable()
    183181#define spinlock_locked(lock)   1
Note: See TracChangeset for help on using the changeset viewer.