Changeset 929ce92 in mainline for kernel/generic/src/synch/waitq.c


Ignore:
Timestamp:
2008-05-12T15:58:06Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
34b3ce3
Parents:
5d12283
Message:

timeouted vs. timed out

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/synch/waitq.c

    r5d12283 r929ce92  
    5555#include <adt/list.h>
    5656
    57 static void waitq_timeouted_sleep(void *data);
     57static void waitq_sleep_timed_out(void *data);
    5858
    5959/** Initialize wait queue
     
    8282 * @param data Pointer to the thread that called waitq_sleep_timeout().
    8383 */
    84 void waitq_timeouted_sleep(void *data)
     84void waitq_sleep_timed_out(void *data)
    8585{
    8686        thread_t *t = (thread_t *) data;
     
    184184 * and all the *_timeout() functions use it.
    185185 *
    186  * @param wq Pointer to wait queue.
    187  * @param usec Timeout in microseconds.
    188  * @param flags Specify mode of the sleep.
     186 * @param wq            Pointer to wait queue.
     187 * @param usec          Timeout in microseconds.
     188 * @param flags         Specify mode of the sleep.
    189189 *
    190190 * The sleep can be interrupted only if the
     
    201201 * call will immediately return, reporting either success or failure.
    202202 *
    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.
    216217 *
    217  * @li ESYNCH_OK_BLOCKED means that the sleep succeeded; the full sleep was
    218  * attempted.
     218 * @li  ESYNCH_OK_BLOCKED means that the sleep succeeded; the full sleep was
     219 *      attempted.
    219220 */
    220221int waitq_sleep_timeout(waitq_t *wq, uint32_t usec, int flags)
     
    356357                THREAD->timeout_pending = true;
    357358                timeout_register(&THREAD->sleep_timeout, (uint64_t) usec,
    358                     waitq_timeouted_sleep, THREAD);
     359                    waitq_sleep_timed_out, THREAD);
    359360        }
    360361
     
    432433         * This is not necessary because of mutual exclusion
    433434         * (the link belongs to the wait queue), but because
    434          * of synchronization with waitq_timeouted_sleep()
     435         * of synchronization with waitq_sleep_timed_out()
    435436         * and thread_interrupt_sleep().
    436437         *
Note: See TracChangeset for help on using the changeset viewer.