Changeset 929ce92 in mainline for kernel/generic/src/synch/waitq.c
- Timestamp:
- 2008-05-12T15:58:06Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 34b3ce3
- Parents:
- 5d12283
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/synch/waitq.c
r5d12283 r929ce92 55 55 #include <adt/list.h> 56 56 57 static void waitq_ timeouted_sleep(void *data);57 static void waitq_sleep_timed_out(void *data); 58 58 59 59 /** Initialize wait queue … … 82 82 * @param data Pointer to the thread that called waitq_sleep_timeout(). 83 83 */ 84 void waitq_ timeouted_sleep(void *data)84 void waitq_sleep_timed_out(void *data) 85 85 { 86 86 thread_t *t = (thread_t *) data; … … 184 184 * and all the *_timeout() functions use it. 185 185 * 186 * @param wq 187 * @param usec 188 * @param flags 186 * @param wq Pointer to wait queue. 187 * @param usec Timeout in microseconds. 188 * @param flags Specify mode of the sleep. 189 189 * 190 190 * The sleep can be interrupted only if the … … 201 201 * call will immediately return, reporting either success or failure. 202 202 * 203 * @return One of: ESYNCH_WOULD_BLOCK, ESYNCH_TIMEOUT, ESYNCH_INTERRUPTED, 204 * ESYNCH_OK_ATOMIC, ESYNCH_OK_BLOCKED. 205 * 206 * @li ESYNCH_WOULD_BLOCK means that the sleep failed because at the time of the 207 * call there was no pending wakeup. 208 * 209 * @li ESYNCH_TIMEOUT means that the sleep timed out. 210 * 211 * @li ESYNCH_INTERRUPTED means that somebody interrupted the sleeping thread. 212 * 213 * @li ESYNCH_OK_ATOMIC means that the sleep succeeded and that there was 214 * a pending wakeup at the time of the call. The caller was not put 215 * asleep at all. 203 * @return Returns one of ESYNCH_WOULD_BLOCK, ESYNCH_TIMEOUT, 204 * ESYNCH_INTERRUPTED, ESYNCH_OK_ATOMIC and 205 * ESYNCH_OK_BLOCKED. 206 * 207 * @li ESYNCH_WOULD_BLOCK means that the sleep failed because at the time of 208 * the call there was no pending wakeup. 209 * 210 * @li ESYNCH_TIMEOUT means that the sleep timed out. 211 * 212 * @li ESYNCH_INTERRUPTED means that somebody interrupted the sleeping thread. 213 * 214 * @li ESYNCH_OK_ATOMIC means that the sleep succeeded and that there was 215 * a pending wakeup at the time of the call. The caller was not put 216 * asleep at all. 216 217 * 217 * @li 218 * attempted.218 * @li ESYNCH_OK_BLOCKED means that the sleep succeeded; the full sleep was 219 * attempted. 219 220 */ 220 221 int waitq_sleep_timeout(waitq_t *wq, uint32_t usec, int flags) … … 356 357 THREAD->timeout_pending = true; 357 358 timeout_register(&THREAD->sleep_timeout, (uint64_t) usec, 358 waitq_ timeouted_sleep, THREAD);359 waitq_sleep_timed_out, THREAD); 359 360 } 360 361 … … 432 433 * This is not necessary because of mutual exclusion 433 434 * (the link belongs to the wait queue), but because 434 * of synchronization with waitq_ timeouted_sleep()435 * of synchronization with waitq_sleep_timed_out() 435 436 * and thread_interrupt_sleep(). 436 437 *
Note:
See TracChangeset
for help on using the changeset viewer.