- Timestamp:
- 2005-10-11T20:25:46Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 26f9943
- Parents:
- a016b63
- Location:
- src/synch
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/synch/condvar.c
ra016b63 ra783ca4 48 48 * to the first waiting thread by waking it up. 49 49 * 50 * @param Condition variable.50 * @param cv Condition variable. 51 51 */ 52 52 void condvar_signal(condvar_t *cv) … … 60 60 * to all waiting threads by waking them up. 61 61 * 62 * @param Condition variable.62 * @param cv Condition variable. 63 63 */ 64 64 void condvar_broadcast(condvar_t *cv) … … 71 71 * Wait for the condition becoming true. 72 72 * 73 * @param Condition variable. 73 * @param cv Condition variable. 74 * @param mtx Mutex. 75 * @param usec Timeout value in microseconds. 76 * @param trywait Blocking versus non-blocking operation mode switch. 77 * 78 * For exact description of possible combinations of 79 * 'usec' and 'trywait', see comment for waitq_sleep_timeout(). 80 * 81 * @return See comment for waitq_sleep_timeout(). 74 82 */ 75 83 int _condvar_wait_timeout(condvar_t *cv, mutex_t *mtx, __u32 usec, int trywait) -
src/synch/mutex.c
ra016b63 ra783ca4 47 47 * Timeout mode and non-blocking mode can be requested. 48 48 * 49 * @param m xtMutex.49 * @param mtx Mutex. 50 50 * @param usec Timeout in microseconds. 51 51 * @param trylock Switches between blocking and non-blocking mode. -
src/synch/waitq.c
ra016b63 ra783ca4 109 109 * 110 110 * @param wq Pointer to wait queue. 111 * @param usec Timeout valuein microseconds.112 * @param nonblocking Controls whether only a conditional sleep113 * (non-blocking sleep) is called for when the usec argument is 0.114 * 115 * Relation between 'usec' and 'nonblocking' is described by this table:116 * 117 * usec | nonblocking | what happens if there is no missed_wakeup118 * -----+-------------+--------------------------------------------119 * 0 | 0 | blocks without timeout until wakeup120 * 0 | <> 0 | immediately returns ESYNCH_WOULD_BLOCK121 * > 0 | x | blocks with timeout until timeout or wakeup111 * @param usec Timeout in microseconds. 112 * @param nonblocking Blocking vs. non-blocking operation mode switch. 113 * 114 * If usec is greater than zero, regardless of the value of @nonblocking, 115 * the call will not return until either timeout or wakeup comes. 116 * 117 * If usec is zero and nonblocking is zero (false), the call 118 * will not return until wakeup comes. 119 * 120 * If usec is zero and nonblocking is non-zero (true), the call will 121 * immediately return, reporting either success or failure. 122 122 * 123 123 * @return Returns one of: ESYNCH_WOULD_BLOCK, ESYNCH_TIMEOUT, 124 124 * ESYNCH_OK_ATOMIC, ESYNCH_OK_BLOCKED. 125 125 * 126 * Meaning of the return values is described by the following chart: 127 * 128 * ESYNCH_WOULD_BLOCK Sleep failed because at the time of the call, 129 * there was no pending wakeup. 130 * ESYNCH_TIMEOUT Sleep timed out. 131 * ESYNCH_OK_ATOMIC Sleep succeeded; at the time of the call, 132 * where was a pending wakeup. 133 * ESYNCH_OK_BLOCKED Sleep succeeded; the full sleep was attempted. 126 * ESYNCH_WOULD_BLOCK means that the sleep failed because at the time 127 * of the call there was no pending wakeup. 128 * 129 * ESYNCH_TIMEOUT means that the sleep timed out. 130 * 131 * ESYNCH_OK_ATOMIC means that the sleep succeeded and that there was 132 * a pending wakeup at the time of the call. The caller was not put 133 * asleep at all. 134 * 135 * ESYNCH_OK_BLOCKED means that the sleep succeeded; the full sleep was 136 * attempted. 134 137 */ 135 138 int waitq_sleep_timeout(waitq_t *wq, __u32 usec, int nonblocking)
Note:
See TracChangeset
for help on using the changeset viewer.
