Changeset 116d1ef4 in mainline for generic/include
- Timestamp:
- 2006-06-02T12:26:50Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d0c5901
- Parents:
- 01ebbdf
- Location:
- generic/include
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/include/ipc/ipc.h
r01ebbdf r116d1ef4 210 210 211 211 extern void ipc_init(void); 212 extern call_t * ipc_wait_for_call(answerbox_t *box, __u32 usec, int nonblocking);212 extern call_t * ipc_wait_for_call(answerbox_t *box, __u32 usec, int flags); 213 213 extern void ipc_answer(answerbox_t *box, call_t *request); 214 214 extern int ipc_call(phone_t *phone, call_t *call); -
generic/include/proc/thread.h
r01ebbdf r116d1ef4 88 88 context_t sleep_interruption_context; 89 89 90 bool sleep_interruptible; /**< If true, the thread can be interrupted from sleep. */ 90 91 waitq_t *sleep_queue; /**< Wait queue in which this thread sleeps. */ 91 92 timeout_t sleep_timeout; /**< Timeout used for timeoutable sleeping. */ -
generic/include/synch/condvar.h
r01ebbdf r116d1ef4 40 40 41 41 #define condvar_wait(cv,mtx) \ 42 _condvar_wait_timeout((cv),(mtx),SYNCH_NO_TIMEOUT )42 _condvar_wait_timeout((cv),(mtx),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NONE) 43 43 #define condvar_wait_timeout(cv,mtx,usec) \ 44 _condvar_wait_timeout((cv),(mtx),(usec) )44 _condvar_wait_timeout((cv),(mtx),(usec),SYNCH_FLAGS_NONE) 45 45 46 46 extern void condvar_initialize(condvar_t *cv); 47 47 extern void condvar_signal(condvar_t *cv); 48 48 extern void condvar_broadcast(condvar_t *cv); 49 extern int _condvar_wait_timeout(condvar_t *cv, mutex_t *mtx, __u32 usec );49 extern int _condvar_wait_timeout(condvar_t *cv, mutex_t *mtx, __u32 usec, int flags); 50 50 51 51 #endif -
generic/include/synch/futex.h
r01ebbdf r116d1ef4 45 45 46 46 extern void futex_init(void); 47 extern __native sys_futex_sleep_timeout(__address uaddr, __u32 usec, int trydown);47 extern __native sys_futex_sleep_timeout(__address uaddr, __u32 usec, int flags); 48 48 extern __native sys_futex_wakeup(__address uaddr); 49 49 -
generic/include/synch/mutex.h
r01ebbdf r116d1ef4 40 40 41 41 #define mutex_lock(mtx) \ 42 _mutex_lock_timeout((mtx),SYNCH_NO_TIMEOUT,SYNCH_ BLOCKING)42 _mutex_lock_timeout((mtx),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NONE) 43 43 #define mutex_trylock(mtx) \ 44 _mutex_lock_timeout((mtx),SYNCH_NO_TIMEOUT,SYNCH_ NON_BLOCKING)44 _mutex_lock_timeout((mtx),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NON_BLOCKING) 45 45 #define mutex_lock_timeout(mtx,usec) \ 46 _mutex_lock_timeout((mtx),(usec),SYNCH_ NON_BLOCKING)46 _mutex_lock_timeout((mtx),(usec),SYNCH_FLAGS_NON_BLOCKING) 47 47 #define mutex_lock_active(mtx) \ 48 48 while (mutex_trylock((mtx)) != ESYNCH_OK_ATOMIC) 49 49 50 50 extern void mutex_initialize(mutex_t *mtx); 51 extern int _mutex_lock_timeout(mutex_t *mtx, __u32 usec, int trylock);51 extern int _mutex_lock_timeout(mutex_t *mtx, __u32 usec, int flags); 52 52 extern void mutex_unlock(mutex_t *mtx); 53 53 -
generic/include/synch/rwlock.h
r01ebbdf r116d1ef4 49 49 50 50 #define rwlock_write_lock(rwl) \ 51 _rwlock_write_lock_timeout((rwl),SYNCH_NO_TIMEOUT,SYNCH_ BLOCKING)51 _rwlock_write_lock_timeout((rwl),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NONE) 52 52 #define rwlock_read_lock(rwl) \ 53 _rwlock_read_lock_timeout((rwl),SYNCH_NO_TIMEOUT,SYNCH_ BLOCKING)53 _rwlock_read_lock_timeout((rwl),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NONE) 54 54 #define rwlock_write_trylock(rwl) \ 55 _rwlock_write_lock_timeout((rwl),SYNCH_NO_TIMEOUT,SYNCH_ NON_BLOCKING)55 _rwlock_write_lock_timeout((rwl),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NON_BLOCKING) 56 56 #define rwlock_read_trylock(rwl) \ 57 _rwlock_read_lock_timeout((rwl),SYNCH_NO_TIMEOUT,SYNCH_ NON_BLOCKING)57 _rwlock_read_lock_timeout((rwl),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NON_BLOCKING) 58 58 #define rwlock_write_lock_timeout(rwl,usec) \ 59 _rwlock_write_lock_timeout((rwl),(usec),SYNCH_ NON_BLOCKING)59 _rwlock_write_lock_timeout((rwl),(usec),SYNCH_FLAGS_NONE) 60 60 #define rwlock_read_lock_timeout(rwl,usec) \ 61 _rwlock_read_lock_timeout((rwl),(usec),SYNCH_ NON_BLOCKING)61 _rwlock_read_lock_timeout((rwl),(usec),SYNCH_FLAGS_NONE) 62 62 63 63 extern void rwlock_initialize(rwlock_t *rwl); 64 64 extern void rwlock_read_unlock(rwlock_t *rwl); 65 65 extern void rwlock_write_unlock(rwlock_t *rwl); 66 extern int _rwlock_read_lock_timeout(rwlock_t *rwl, __u32 usec, int trylock);67 extern int _rwlock_write_lock_timeout(rwlock_t *rwl, __u32 usec, int trylock);66 extern int _rwlock_read_lock_timeout(rwlock_t *rwl, __u32 usec, int flags); 67 extern int _rwlock_write_lock_timeout(rwlock_t *rwl, __u32 usec, int flags); 68 68 69 69 #endif 70 -
generic/include/synch/semaphore.h
r01ebbdf r116d1ef4 41 41 42 42 #define semaphore_down(s) \ 43 _semaphore_down_timeout((s),SYNCH_NO_TIMEOUT,SYNCH_ BLOCKING)43 _semaphore_down_timeout((s),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NONE) 44 44 #define semaphore_trydown(s) \ 45 _semaphore_down_timeout((s),SYNCH_NO_TIMEOUT,SYNCH_ NON_BLOCKING)45 _semaphore_down_timeout((s),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NON_BLOCKING) 46 46 #define semaphore_down_timeout(s,usec) \ 47 _semaphore_down_timeout((s),(usec),SYNCH_ NON_BLOCKING)47 _semaphore_down_timeout((s),(usec),SYNCH_FLAGS_NONE) 48 48 49 49 extern void semaphore_initialize(semaphore_t *s, int val); 50 extern int _semaphore_down_timeout(semaphore_t *s, __u32 usec, int trydown);50 extern int _semaphore_down_timeout(semaphore_t *s, __u32 usec, int flags); 51 51 extern void semaphore_up(semaphore_t *s); 52 52 53 53 #endif 54 -
generic/include/synch/synch.h
r01ebbdf r116d1ef4 31 31 32 32 #define SYNCH_NO_TIMEOUT 0 /**< Request with no timeout. */ 33 #define SYNCH_BLOCKING 0 /**< Blocking operation request. */ 34 #define SYNCH_NON_BLOCKING 1 /**< Non-blocking operation request. */ 33 34 #define SYNCH_FLAGS_NONE 0 /**< No flags specified. */ 35 #define SYNCH_FLAGS_NON_BLOCKING (1<<0) /**< Non-blocking operation request. */ 36 #define SYNCH_FLAGS_INTERRUPTIBLE (1<<1) /**< Interruptible operation. */ 35 37 36 38 #define ESYNCH_WOULD_BLOCK 1 /**< Could not satisfy the request without going to sleep. */ -
generic/include/synch/waitq.h
r01ebbdf r116d1ef4 53 53 54 54 #define waitq_sleep(wq) \ 55 waitq_sleep_timeout((wq),SYNCH_NO_TIMEOUT,SYNCH_ BLOCKING)55 waitq_sleep_timeout((wq),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NONE) 56 56 57 57 extern void waitq_initialize(waitq_t *wq); 58 extern int waitq_sleep_timeout(waitq_t *wq, __u32 usec, int nonblocking);58 extern int waitq_sleep_timeout(waitq_t *wq, __u32 usec, int flags); 59 59 extern ipl_t waitq_sleep_prepare(waitq_t *wq); 60 extern int waitq_sleep_timeout_unsafe(waitq_t *wq, __u32 usec, int nonblocking);60 extern int waitq_sleep_timeout_unsafe(waitq_t *wq, __u32 usec, int flags); 61 61 extern void waitq_sleep_finish(waitq_t *wq, int rc, ipl_t ipl); 62 62 extern void waitq_wakeup(waitq_t *wq, bool all);
Note:
See TracChangeset
for help on using the changeset viewer.