blob: b218ac1c23b1c8b957b2fed1b73820031e77f6fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
typedef uint32_t eventmask_t;
struct eventflag {
chopstx_t sleeper;
eventmask_t flag;
chopstx_mutex_t mutex;
union {
uint32_t wait_usec;
chopstx_cond_t cond;
} u;
};
void eventflag_init (struct eventflag *ev, chopstx_t owner);
eventmask_t eventflag_wait (struct eventflag *ev);
eventmask_t eventflag_wait_timeout (struct eventflag *ev, uint32_t usec);
void eventflag_signal (struct eventflag *ev, eventmask_t m);
|