summaryrefslogtreecommitdiff
path: root/eventflag.h
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2013-06-19 13:56:25 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2013-06-19 13:56:25 +0900
commit0913c0d109ab924e9c89b8064ac84d9d34d52360 (patch)
tree868654b5f4d516c81843d685585518112d641f07 /eventflag.h
parentd77204c7d536806f66d3ad0e477e8039ff441681 (diff)
support non-timed eventflag
Diffstat (limited to 'eventflag.h')
-rw-r--r--eventflag.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/eventflag.h b/eventflag.h
index 0b595b8..ce109f3 100644
--- a/eventflag.h
+++ b/eventflag.h
@@ -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);