Changeset 116d1ef4 in mainline for generic/include/synch/mutex.h


Ignore:
Timestamp:
2006-06-02T12:26:50Z (18 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/include/synch/mutex.h

    r01ebbdf r116d1ef4  
    4040
    4141#define mutex_lock(mtx) \
    42         _mutex_lock_timeout((mtx),SYNCH_NO_TIMEOUT,SYNCH_BLOCKING)
     42        _mutex_lock_timeout((mtx),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NONE)
    4343#define mutex_trylock(mtx) \
    44         _mutex_lock_timeout((mtx),SYNCH_NO_TIMEOUT,SYNCH_NON_BLOCKING)
     44        _mutex_lock_timeout((mtx),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NON_BLOCKING)
    4545#define mutex_lock_timeout(mtx,usec) \
    46         _mutex_lock_timeout((mtx),(usec),SYNCH_NON_BLOCKING)
     46        _mutex_lock_timeout((mtx),(usec),SYNCH_FLAGS_NON_BLOCKING)
    4747#define mutex_lock_active(mtx) \
    4848        while (mutex_trylock((mtx)) != ESYNCH_OK_ATOMIC)
    4949
    5050extern void mutex_initialize(mutex_t *mtx);
    51 extern int _mutex_lock_timeout(mutex_t *mtx, __u32 usec, int trylock);
     51extern int _mutex_lock_timeout(mutex_t *mtx, __u32 usec, int flags);
    5252extern void mutex_unlock(mutex_t *mtx);
    5353
Note: See TracChangeset for help on using the changeset viewer.