support non-timed eventflag

This commit is contained in:
NIIBE Yutaka
2013-06-19 13:56:25 +09:00
parent d77204c7d5
commit 0913c0d109
2 changed files with 53 additions and 12 deletions

View File

@@ -1,10 +1,13 @@
typedef uint32_t eventmask_t;
struct eventflag {
chopstx_t owner;
uint32_t wait_usec;
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);