Changeset 116d1ef4 in mainline for generic/src/synch/mutex.c


Ignore:
Timestamp:
2006-06-02T12:26:50Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d0c5901
Parents:
01ebbdf
Message:

Replace nonblocking argument of waitq_sleep_timeout with flags that specify mode of operation.
Now a flag can be used to specify interruptible sleep.
Modify waitq_interrupt_sleep() to only interrupt threads that used this flag.
O

File:
1 edited

Legend:

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

    r01ebbdf r116d1ef4  
    5454 * @param mtx Mutex.
    5555 * @param usec Timeout in microseconds.
    56  * @param trylock Switches between blocking and non-blocking mode.
     56 * @param flags Specify mode of operation.
    5757 *
    5858 * For exact description of possible combinations of
    59  * usec and trylock, see comment for waitq_sleep_timeout().
     59 * usec and flags, see comment for waitq_sleep_timeout().
    6060 *
    6161 * @return See comment for waitq_sleep_timeout().
    6262 */
    63 int _mutex_lock_timeout(mutex_t *mtx, __u32 usec, int trylock)
     63int _mutex_lock_timeout(mutex_t *mtx, __u32 usec, int flags)
    6464{
    65         return _semaphore_down_timeout(&mtx->sem, usec, trylock);
     65        return _semaphore_down_timeout(&mtx->sem, usec, flags);
    6666}
    6767
     
    7676        semaphore_up(&mtx->sem);
    7777}
     78
Note: See TracChangeset for help on using the changeset viewer.