diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2016-05-18 16:52:00 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2016-05-18 16:52:00 +0900 |
commit | db413813b6cd8a0891805a1111824ffd4d5a3737 (patch) | |
tree | c69366352fc31f9b7bc8953bed056a579caafae9 /eventflag.h | |
parent | 7f009dbb5d44ae67d7bb3529973f2eee2e186612 (diff) |
eventflag rewrite
Diffstat (limited to 'eventflag.h')
-rw-r--r-- | eventflag.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/eventflag.h b/eventflag.h index b218ac1..d1b9392 100644 --- a/eventflag.h +++ b/eventflag.h @@ -1,16 +1,12 @@ typedef uint32_t eventmask_t; struct eventflag { - chopstx_t sleeper; - eventmask_t flag; + eventmask_t flags; chopstx_mutex_t mutex; - union { - uint32_t wait_usec; - chopstx_cond_t cond; - } u; + chopstx_cond_t cond; }; -void eventflag_init (struct eventflag *ev, chopstx_t owner); +void eventflag_init (struct eventflag *ev); 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); |