Changeset cc106e4 in mainline for kernel/generic
- Timestamp:
- 2012-11-07T18:44:33Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fc89e32
- Parents:
- 2708f6a
- Location:
- kernel/generic
- Files:
-
- 5 edited
-
include/synch/condvar.h (modified) (2 diffs)
-
include/synch/spinlock.h (modified) (3 diffs)
-
src/smp/smp_call.c (modified) (1 diff)
-
src/synch/condvar.c (modified) (1 diff)
-
src/synch/rcu.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/synch/condvar.h
r2708f6a rcc106e4 51 51 _condvar_wait_timeout((cv), (mtx), (usec), SYNCH_FLAGS_NONE) 52 52 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 53 61 extern void condvar_initialize(condvar_t *cv); 54 62 extern void condvar_signal(condvar_t *cv); … … 56 64 extern int _condvar_wait_timeout(condvar_t *cv, mutex_t *mtx, uint32_t usec, 57 65 int flags); 58 extern int _condvar_wait_timeout_spinlock (condvar_t *cv, spinlock_t *lock,66 extern int _condvar_wait_timeout_spinlock_impl(condvar_t *cv, spinlock_t *lock, 59 67 uint32_t usec, int flags); 60 68 extern int _condvar_wait_timeout_irq_spinlock(condvar_t *cv, -
kernel/generic/include/synch/spinlock.h
r2708f6a rcc106e4 45 45 #ifdef CONFIG_SMP 46 46 47 typedef struct {47 typedef struct spinlock { 48 48 atomic_t val; 49 49 … … 162 162 /* On UP systems, spinlocks are effectively left out. */ 163 163 164 /* Allow the use of spinlock_t as an incomplete type. */ 165 typedef struct spinlock spinlock_t; 166 164 167 #define SPINLOCK_DECLARE(name) 165 168 #define SPINLOCK_EXTERN(name) … … 176 179 177 180 #define spinlock_lock(lock) preemption_disable() 178 #define spinlock_trylock(lock) ( preemption_disable(), 1)181 #define spinlock_trylock(lock) ({ preemption_disable(); 1; }) 179 182 #define spinlock_unlock(lock) preemption_enable() 180 183 #define spinlock_locked(lock) 1 -
kernel/generic/src/smp/smp_call.c
r2708f6a rcc106e4 131 131 /* 132 132 * 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() 134 134 * on cpu_id in turn. 135 135 * -
kernel/generic/src/synch/condvar.c
r2708f6a rcc106e4 120 120 * @return See comment for waitq_sleep_timeout(). 121 121 */ 122 int _condvar_wait_timeout_spinlock (condvar_t *cv, spinlock_t *lock,122 int _condvar_wait_timeout_spinlock_impl(condvar_t *cv, spinlock_t *lock, 123 123 uint32_t usec, int flags) 124 124 { -
kernel/generic/src/synch/rcu.c
r2708f6a rcc106e4 861 861 862 862 /* 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); 865 865 866 866 if (ret == ESYNCH_INTERRUPTED) {
Note:
See TracChangeset
for help on using the changeset viewer.
