Subversion Repositories HelenOS

Rev

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

Rev 2071 Rev 2085
Line 35... Line 35...
35
#ifndef KERN_CONDVAR_H_
35
#ifndef KERN_CONDVAR_H_
36
#define KERN_CONDVAR_H_
36
#define KERN_CONDVAR_H_
37
 
37
 
38
#include <arch/types.h>
38
#include <arch/types.h>
39
#include <synch/waitq.h>
39
#include <synch/waitq.h>
40
#include <typedefs.h>
40
#include <synch/mutex.h>
41
#include <synch/synch.h>
41
#include <synch/synch.h>
42
 
42
 
43
struct condvar {
43
typedef struct {
44
    waitq_t wq;
44
    waitq_t wq;
45
};
45
} condvar_t;
46
 
46
 
47
#define condvar_wait(cv,mtx) \
47
#define condvar_wait(cv,mtx) \
48
    _condvar_wait_timeout((cv),(mtx),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NONE)
48
    _condvar_wait_timeout((cv),(mtx),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NONE)
49
#define condvar_wait_timeout(cv,mtx,usec) \
49
#define condvar_wait_timeout(cv,mtx,usec) \
50
    _condvar_wait_timeout((cv),(mtx),(usec),SYNCH_FLAGS_NONE)
50
    _condvar_wait_timeout((cv),(mtx),(usec),SYNCH_FLAGS_NONE)