Subversion Repositories HelenOS-historic

Rev

Rev 534 | Rev 1702 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 534 Rev 1380
Line 42... Line 42...
42
    _mutex_lock_timeout((mtx),SYNCH_NO_TIMEOUT,SYNCH_BLOCKING)
42
    _mutex_lock_timeout((mtx),SYNCH_NO_TIMEOUT,SYNCH_BLOCKING)
43
#define mutex_trylock(mtx) \
43
#define mutex_trylock(mtx) \
44
    _mutex_lock_timeout((mtx),SYNCH_NO_TIMEOUT,SYNCH_NON_BLOCKING)
44
    _mutex_lock_timeout((mtx),SYNCH_NO_TIMEOUT,SYNCH_NON_BLOCKING)
45
#define mutex_lock_timeout(mtx,usec) \
45
#define mutex_lock_timeout(mtx,usec) \
46
    _mutex_lock_timeout((mtx),(usec),SYNCH_NON_BLOCKING)
46
    _mutex_lock_timeout((mtx),(usec),SYNCH_NON_BLOCKING)
-
 
47
#define mutex_lock_active(mtx) \
-
 
48
    while (mutex_trylock((mtx)) != ESYNCH_OK_ATOMIC)
47
   
49
 
48
extern void mutex_initialize(mutex_t *mtx);
50
extern void mutex_initialize(mutex_t *mtx);
49
extern int _mutex_lock_timeout(mutex_t *mtx, __u32 usec, int trylock);
51
extern int _mutex_lock_timeout(mutex_t *mtx, __u32 usec, int trylock);
50
extern void mutex_unlock(mutex_t *mtx);
52
extern void mutex_unlock(mutex_t *mtx);
51
 
53
 
52
#endif
54
#endif