Changeset 2e4e706 in mainline for kernel/generic/src/synch/mutex.c


Ignore:
Timestamp:
2010-05-13T08:51:36Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c964521
Parents:
9929742
Message:

cstyle changes (no change in functionality)

File:
1 edited

Legend:

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

    r9929742 r2e4e706  
    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().
     66 * @return See comment for waitq_sleep_timeout().
     67 *
    6768 */
    6869int _mutex_lock_timeout(mutex_t *mtx, uint32_t usec, int flags)
     
    7071        int rc;
    7172
    72         if (mtx->type == MUTEX_PASSIVE && THREAD) {
     73        if ((mtx->type == MUTEX_PASSIVE) && (THREAD)) {
    7374                rc = _semaphore_down_timeout(&mtx->sem, usec, flags);
    7475        } else {
    75                 ASSERT(mtx->type == MUTEX_ACTIVE || !THREAD);
     76                ASSERT((mtx->type == MUTEX_ACTIVE) || (!THREAD));
    7677                ASSERT(usec == SYNCH_NO_TIMEOUT);
    7778                ASSERT(!(flags & SYNCH_FLAGS_INTERRUPTIBLE));
     79               
    7880                do {
    7981                        rc = semaphore_trydown(&mtx->sem);
     
    8789/** Release mutex.
    8890 *
    89  * @param mtx           Mutex.
     91 * @param mtx Mutex.
    9092 */
    9193void mutex_unlock(mutex_t *mtx)
Note: See TracChangeset for help on using the changeset viewer.