Countdown latch (using events)
include/sync/event_latch.h View source View on GitHubStructs
Section titled “Structs”event_latch
Section titled “event_latch” struct event_latch (2 fields) source
§
struct once_latch latch Functions
Section titled “Functions”event_latch_init
Section titled “event_latch_init”void event_latch_init(struct event_latch *el, uint64_t count) source event_latch_count_down
Section titled “event_latch_count_down”bool event_latch_count_down(struct event_latch *el) source event_latch_is_ready
Section titled “event_latch_is_ready”bool event_latch_is_ready(const struct event_latch *el) source event_latch_count
Section titled “event_latch_count”uint64_t event_latch_count(const struct event_latch *el) source event_latch_wait
Section titled “event_latch_wait”void event_latch_wait(struct event_latch *el) source event_latch_wait_timeout
Section titled “event_latch_wait_timeout”bool event_latch_wait_timeout(
struct event_latch *el,
time_ms_t timeout_ms
) source Macros
Section titled “Macros”EVENT_LATCH_INIT
Section titled “EVENT_LATCH_INIT”#define EVENT_LATCH_INIT(name_, n) source Expansion
#define EVENT_LATCH_INIT(name_, n) \
(struct event_latch) { \
.latch = ONCE_LATCH_INIT(n), \
.ready = EVENT_INIT((name_).ready, EVENT_NOTIFICATION, false), \
}