Changeset cc106e4 in mainline for kernel/generic/include


Ignore:
Timestamp:
2012-11-07T18:44:33Z (13 years ago)
Author:
Adam Hraska <adam.hraska+hos@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fc89e32
Parents:
2708f6a
Message:

Fixed build for sparc64/ultra, sparc64/niagara, ppc32, mips32/GXemul.

Location:
kernel/generic/include/synch
Files:
2 edited

Legend:

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

    r2708f6a rcc106e4  
    5151        _condvar_wait_timeout((cv), (mtx), (usec), SYNCH_FLAGS_NONE)
    5252
     53#ifdef CONFIG_SMP
     54#define _condvar_wait_timeout_spinlock(cv, lock, usec, flags) \
     55        _condvar_wait_timeout_spinlock_impl((cv), (lock), (usec), (flags))
     56#else
     57#define _condvar_wait_timeout_spinlock(cv, lock, usec, flags) \
     58        _condvar_wait_timeout_spinlock_impl((cv), NULL, (usec), (flags))
     59#endif
     60
    5361extern void condvar_initialize(condvar_t *cv);
    5462extern void condvar_signal(condvar_t *cv);
     
    5664extern int _condvar_wait_timeout(condvar_t *cv, mutex_t *mtx, uint32_t usec,
    5765    int flags);
    58 extern int _condvar_wait_timeout_spinlock(condvar_t *cv, spinlock_t *lock,
     66extern int _condvar_wait_timeout_spinlock_impl(condvar_t *cv, spinlock_t *lock,
    5967        uint32_t usec, int flags);
    6068extern int _condvar_wait_timeout_irq_spinlock(condvar_t *cv,
  • kernel/generic/include/synch/spinlock.h

    r2708f6a 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.