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


Ignore:
Timestamp:
2010-04-28T21:12:04Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c050399
Parents:
b8f7ea78 (diff), 55821eea (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge blocking and locking improvements and fixes.

File:
1 edited

Legend:

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

    rb8f7ea78 rc2ab3f4  
    4040#include <synch/synch.h>
    4141#include <debug.h>
     42#include <arch.h>
    4243
    4344/** Initialize mutex.
     
    6970        int rc;
    7071
    71         if (mtx->type == MUTEX_PASSIVE) {
     72        if (mtx->type == MUTEX_PASSIVE && THREAD) {
    7273                rc = _semaphore_down_timeout(&mtx->sem, usec, flags);
    7374        } else {
    74                 ASSERT(mtx->type == MUTEX_ACTIVE);
     75                ASSERT(mtx->type == MUTEX_ACTIVE || !THREAD);
    7576                ASSERT(usec == SYNCH_NO_TIMEOUT);
    7677                ASSERT(!(flags & SYNCH_FLAGS_INTERRUPTIBLE));
Note: See TracChangeset for help on using the changeset viewer.