mirror of
https://github.com/Qortal/Brooklyn.git
synced 2025-02-01 07:42:18 +00:00
19 lines
581 B
C
19 lines
581 B
C
typedef uint32_t eventmask_t;
|
|
|
|
struct eventflag {
|
|
eventmask_t flags;
|
|
eventmask_t mask;
|
|
chopstx_mutex_t mutex;
|
|
chopstx_cond_t cond;
|
|
};
|
|
|
|
void eventflag_init (struct eventflag *ev);
|
|
void eventflag_set_mask (struct eventflag *ev, eventmask_t m);
|
|
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);
|
|
|
|
/* For polling */
|
|
void eventflag_prepare_poll (struct eventflag *ev, chopstx_poll_cond_t *p);
|
|
eventmask_t eventflag_get (struct eventflag *ev);
|