Changeset cc106e4 in mainline for kernel/generic


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
Files:
5 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
  • kernel/generic/src/smp/smp_call.c

    r2708f6a rcc106e4  
    131131                /*
    132132                 * If a platform supports SMP it must implement arch_smp_call_ipi().
    133                  * It should issue an IPI an cpu_id and invoke smp_call_ipi_recv()
     133                 * It should issue an IPI on cpu_id and invoke smp_call_ipi_recv()
    134134                 * on cpu_id in turn.
    135135                 *
  • kernel/generic/src/synch/condvar.c

    r2708f6a rcc106e4  
    120120 * @return See comment for waitq_sleep_timeout().
    121121 */
    122 int _condvar_wait_timeout_spinlock(condvar_t *cv, spinlock_t *lock,
     122int _condvar_wait_timeout_spinlock_impl(condvar_t *cv, spinlock_t *lock,
    123123        uint32_t usec, int flags)
    124124{
  • kernel/generic/src/synch/rcu.c

    r2708f6a rcc106e4  
    861861                       
    862862                        /* Wait for the GP to complete. */
    863                         int ret = _condvar_wait_timeout_spinlock(&rcu.gp_ended,
    864                                 &rcu.gp_lock, SYNCH_NO_TIMEOUT, SYNCH_FLAGS_INTERRUPTIBLE);
     863                        int ret = _condvar_wait_timeout_spinlock(&rcu.gp_ended, &rcu.gp_lock,
     864                                SYNCH_NO_TIMEOUT, SYNCH_FLAGS_INTERRUPTIBLE);
    865865                       
    866866                        if (ret == ESYNCH_INTERRUPTED) {
Note: See TracChangeset for help on using the changeset viewer.