Changeset 4e33b6b in mainline for kernel/generic/src/synch/waitq.c


Ignore:
Timestamp:
2007-01-07T14:44:33Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d78d603
Parents:
c109dd0
Message:

More formatting changes.

File:
1 edited

Legend:

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

    rc109dd0 r4e33b6b  
    189189 
    190190 * If usec is greater than zero, regardless of the value of the
    191  * SYNCH_FLAGS_NON_BLOCKING bit in flags, the call will not return until either timeout,
    192  * interruption or wakeup comes.
    193  *
    194  * If usec is zero and the SYNCH_FLAGS_NON_BLOCKING bit is not set in flags, the call
    195  * will not return until wakeup or interruption comes.
    196  *
    197  * If usec is zero and the SYNCH_FLAGS_NON_BLOCKING bit is set in flags, the call will
    198  * immediately return, reporting either success or failure.
    199  *
    200  * @return      Returns one of: ESYNCH_WOULD_BLOCK, ESYNCH_TIMEOUT, ESYNCH_INTERRUPTED,
    201  *              ESYNCH_OK_ATOMIC, ESYNCH_OK_BLOCKED.
    202  *
    203  * @li ESYNCH_WOULD_BLOCK means that the sleep failed because at the time
    204  * of the call there was no pending wakeup.
     191 * SYNCH_FLAGS_NON_BLOCKING bit in flags, the call will not return until either
     192 * timeout, interruption or wakeup comes.
     193 *
     194 * If usec is zero and the SYNCH_FLAGS_NON_BLOCKING bit is not set in flags,
     195 * the call will not return until wakeup or interruption comes.
     196 *
     197 * If usec is zero and the SYNCH_FLAGS_NON_BLOCKING bit is set in flags, the
     198 * call will immediately return, reporting either success or failure.
     199 *
     200 * @return One of: ESYNCH_WOULD_BLOCK, ESYNCH_TIMEOUT, ESYNCH_INTERRUPTED,
     201 * ESYNCH_OK_ATOMIC, ESYNCH_OK_BLOCKED.
     202 *
     203 * @li ESYNCH_WOULD_BLOCK means that the sleep failed because at the time of the
     204 * call there was no pending wakeup.
    205205 *
    206206 * @li ESYNCH_TIMEOUT means that the sleep timed out.
     
    352352                }
    353353                THREAD->timeout_pending = true;
    354                 timeout_register(&THREAD->sleep_timeout, (uint64_t) usec, waitq_timeouted_sleep, THREAD);
     354                timeout_register(&THREAD->sleep_timeout, (uint64_t) usec,
     355                        waitq_timeouted_sleep, THREAD);
    355356        }
    356357
     
    365366        spinlock_unlock(&THREAD->lock);
    366367
    367         scheduler();    /* wq->lock is released in scheduler_separated_stack() */
     368        /* wq->lock is released in scheduler_separated_stack() */
     369        scheduler();
    368370       
    369371        return ESYNCH_OK_BLOCKED;
     
    373375/** Wake up first thread sleeping in a wait queue
    374376 *
    375  * Wake up first thread sleeping in a wait queue.
    376  * This is the SMP- and IRQ-safe wrapper meant for
    377  * general use.
    378  *
    379  * Besides its 'normal' wakeup operation, it attempts
    380  * to unregister possible timeout.
     377 * Wake up first thread sleeping in a wait queue. This is the SMP- and IRQ-safe
     378 * wrapper meant for general use.
     379 *
     380 * Besides its 'normal' wakeup operation, it attempts to unregister possible
     381 * timeout.
    381382 *
    382383 * @param wq Pointer to wait queue.
    383  * @param all If this is non-zero, all sleeping threads
    384  *        will be woken up and missed count will be zeroed.
     384 * @param all If this is non-zero, all sleeping threads will be woken up and
     385 *      missed count will be zeroed.
    385386 */
    386387void waitq_wakeup(waitq_t *wq, bool all)
     
    399400/** Internal SMP- and IRQ-unsafe version of waitq_wakeup()
    400401 *
    401  * This is the internal SMP- and IRQ-unsafe version
    402  * of waitq_wakeup(). It assumes wq->lock is already
    403  * locked and interrupts are already disabled.
     402 * This is the internal SMP- and IRQ-unsafe version of waitq_wakeup(). It
     403 * assumes wq->lock is already locked and interrupts are already disabled.
    404404 *
    405405 * @param wq Pointer to wait queue.
    406  * @param all If this is non-zero, all sleeping threads
    407  *        will be woken up and missed count will be zeroed.
     406 * @param all If this is non-zero, all sleeping threads will be woken up and
     407 *      missed count will be zeroed.
    408408 */
    409409void _waitq_wakeup_unsafe(waitq_t *wq, bool all)
Note: See TracChangeset for help on using the changeset viewer.