Changeset a783ca4 in mainline for src/synch/waitq.c
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.