Changeset b1c57a8 in mainline for kernel/generic/include/synch
- Timestamp:
- 2014-10-09T15:03:55Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e367939c
- Parents:
- 21799398 (diff), 207e8880 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- kernel/generic/include/synch
- Files:
-
- 4 added
- 4 edited
-
condvar.h (modified) (3 diffs)
-
futex.h (modified) (1 diff)
-
rcu.h (added)
-
rcu_types.h (added)
-
semaphore.h (modified) (1 diff)
-
smp_memory_barrier.h (added)
-
spinlock.h (modified) (3 diffs)
-
workqueue.h (added)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/synch/condvar.h
r21799398 rb1c57a8 39 39 #include <synch/waitq.h> 40 40 #include <synch/mutex.h> 41 #include <synch/spinlock.h> 41 42 #include <abi/synch.h> 42 43 … … 50 51 _condvar_wait_timeout((cv), (mtx), (usec), SYNCH_FLAGS_NONE) 51 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 52 61 extern void condvar_initialize(condvar_t *cv); 53 62 extern void condvar_signal(condvar_t *cv); … … 55 64 extern int _condvar_wait_timeout(condvar_t *cv, mutex_t *mtx, uint32_t usec, 56 65 int flags); 66 extern int _condvar_wait_timeout_spinlock_impl(condvar_t *cv, spinlock_t *lock, 67 uint32_t usec, int flags); 68 extern int _condvar_wait_timeout_irq_spinlock(condvar_t *cv, 69 irq_spinlock_t *irq_lock, uint32_t usec, int flags); 70 57 71 58 72 #endif -
kernel/generic/include/synch/futex.h
r21799398 rb1c57a8 55 55 extern sysarg_t sys_futex_wakeup(uintptr_t); 56 56 57 extern void futex_cleanup(void); 57 extern void futex_task_cleanup(void); 58 extern void futex_task_init(struct task *); 59 extern void futex_task_deinit(struct task *); 58 60 59 61 #endif -
kernel/generic/include/synch/semaphore.h
r21799398 rb1c57a8 53 53 _semaphore_down_timeout((s), (usec), SYNCH_FLAGS_NONE) 54 54 55 #define semaphore_down_interruptable(s) \ 56 (ESYNCH_INTERRUPTED != _semaphore_down_timeout((s), SYNCH_NO_TIMEOUT, \ 57 SYNCH_FLAGS_INTERRUPTIBLE)) 58 55 59 extern void semaphore_initialize(semaphore_t *, int); 56 60 extern int _semaphore_down_timeout(semaphore_t *, uint32_t, unsigned int); -
kernel/generic/include/synch/spinlock.h
r21799398 rb1c57a8 45 45 #ifdef CONFIG_SMP 46 46 47 typedef struct {47 typedef struct spinlock { 48 48 atomic_t val; 49 49 … … 163 163 /* On UP systems, spinlocks are effectively left out. */ 164 164 165 /* Allow the use of spinlock_t as an incomplete type. */ 166 typedef struct spinlock spinlock_t; 167 165 168 #define SPINLOCK_DECLARE(name) 166 169 #define SPINLOCK_EXTERN(name) … … 177 180 178 181 #define spinlock_lock(lock) preemption_disable() 179 #define spinlock_trylock(lock) ( preemption_disable(), 1)182 #define spinlock_trylock(lock) ({ preemption_disable(); 1; }) 180 183 #define spinlock_unlock(lock) preemption_enable() 181 184 #define spinlock_locked(lock) 1
Note:
See TracChangeset
for help on using the changeset viewer.
