Ignore:
File:
1 edited

Legend:

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

    r2e4e706 ra3900cc  
    3333/**
    3434 * @file
    35  * @brief Mutexes.
     35 * @brief       Mutexes.
    3636 */
    37 
     37 
    3838#include <synch/mutex.h>
    3939#include <synch/semaphore.h>
     
    4444/** Initialize mutex.
    4545 *
    46  * @param mtx  Mutex.
    47  * @param type Type of the mutex.
     46 * @param mtx           Mutex.
     47 * @param type          Type of the mutex.
    4848 */
    4949void mutex_initialize(mutex_t *mtx, mutex_type_t type)
     
    5757 * Timeout mode and non-blocking mode can be requested.
    5858 *
    59  * @param mtx   Mutex.
    60  * @param usec  Timeout in microseconds.
    61  * @param flags Specify mode of operation.
     59 * @param mtx           Mutex.
     60 * @param usec          Timeout in microseconds.
     61 * @param flags         Specify mode of operation.
    6262 *
    6363 * For exact description of possible combinations of
    6464 * usec and flags, see comment for waitq_sleep_timeout().
    6565 *
    66  * @return See comment for waitq_sleep_timeout().
    67  *
     66 * @return              See comment for waitq_sleep_timeout().
    6867 */
    6968int _mutex_lock_timeout(mutex_t *mtx, uint32_t usec, int flags)
     
    7170        int rc;
    7271
    73         if ((mtx->type == MUTEX_PASSIVE) && (THREAD)) {
     72        if (mtx->type == MUTEX_PASSIVE && THREAD) {
    7473                rc = _semaphore_down_timeout(&mtx->sem, usec, flags);
    7574        } else {
    76                 ASSERT((mtx->type == MUTEX_ACTIVE) || (!THREAD));
     75                ASSERT(mtx->type == MUTEX_ACTIVE || !THREAD);
    7776                ASSERT(usec == SYNCH_NO_TIMEOUT);
    7877                ASSERT(!(flags & SYNCH_FLAGS_INTERRUPTIBLE));
    79                
    8078                do {
    8179                        rc = semaphore_trydown(&mtx->sem);
     
    8987/** Release mutex.
    9088 *
    91  * @param mtx Mutex.
     89 * @param mtx           Mutex.
    9290 */
    9391void mutex_unlock(mutex_t *mtx)
Note: See TracChangeset for help on using the changeset viewer.