Changeset 08a19ba in mainline for kernel/generic/src/synch/condvar.c


Ignore:
Timestamp:
2008-06-23T18:44:48Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1a1744e
Parents:
deaf8d5
Message:

Support for active mutexes. Active mutexes implement busy waiting, pretty much
in the same way as spinlocks, but can be passed to condition variables, which is
the motivation for this enhancement.

File:
1 edited

Legend:

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

    rdeaf8d5 r08a19ba  
    4444/** Initialize condition variable.
    4545 *
    46  * @param cv Condition variable.
     46 * @param cv            Condition variable.
    4747 */
    4848void condvar_initialize(condvar_t *cv)
     
    5151}
    5252
    53 /**
    54  * Signal the condition has become true
    55  * to the first waiting thread by waking it up.
     53/** Signal the condition has become true to the first waiting thread by waking
     54 * it up.
    5655 *
    57  * @param cv Condition variable.
     56 * @param cv            Condition variable.
    5857 */
    5958void condvar_signal(condvar_t *cv)
     
    6261}
    6362
    64 /**
    65  * Signal the condition has become true
    66  * to all waiting threads by waking them up.
     63/** Signal the condition has become true to all waiting threads by waking
     64 * them up.
    6765 *
    68  * @param cv Condition variable.
     66 * @param cv            Condition variable.
    6967 */
    7068void condvar_broadcast(condvar_t *cv)
     
    7573/** Wait for the condition becoming true.
    7674 *
    77  * @param cv Condition variable.
    78  * @param mtx Mutex.
    79  * @param usec Timeout value in microseconds.
    80  * @param flags Select mode of operation.
     75 * @param cv            Condition variable.
     76 * @param mtx           Mutex.
     77 * @param usec          Timeout value in microseconds.
     78 * @param flags         Select mode of operation.
    8179 *
    82  * For exact description of meaning of possible combinations
    83  * of usec and flags, see comment for waitq_sleep_timeout().
    84  * Note that when SYNCH_FLAGS_NON_BLOCKING is specified here,
    85  * ESYNCH_WOULD_BLOCK is always returned.
     80 * For exact description of meaning of possible combinations of usec and flags,
     81 * see comment for waitq_sleep_timeout().  Note that when
     82 * SYNCH_FLAGS_NON_BLOCKING is specified here, ESYNCH_WOULD_BLOCK is always
     83 * returned.
    8684 *
    87  * @return See comment for waitq_sleep_timeout().
     85 * @return              See comment for waitq_sleep_timeout().
    8886 */
    8987int _condvar_wait_timeout(condvar_t *cv, mutex_t *mtx, uint32_t usec, int flags)
Note: See TracChangeset for help on using the changeset viewer.