14 typedef struct waiter_t waiter_t;
15 typedef struct wait_record_t wait_record_t;
40 wait_record_t *
waiter_add_deadline(waiter_t *waiter, uint64_t deadline, uint64_t (*callback)(
void *data),
void *data);
50 wait_record_t *
waiter_add_signal(waiter_t *waiter,
bool (*callback)(
void *data),
void *data);
void waiter_destroy(waiter_t *waiter)
Destroys a waiter.
void waiter_reset_signal(waiter_t *waiter, wait_record_t *record)
Resets the signal marked by waiter_signal.
uint32_t result_t
Function result.
Definition: types.h:51
void waiter_cancel(waiter_t *waiter, wait_record_t *record)
Removes a record from the waiter, interrupting it.
wait_record_t * waiter_add_deadline(waiter_t *waiter, uint64_t deadline, uint64_t(*callback)(void *data), void *data)
Adds a timed callback to the waiter.
waiter_t * waiter_create()
Creates a new waiter object.
uint32_t handle_t
Resource handle.
Definition: types.h:38
wait_record_t * waiter_add(waiter_t *waiter, handle_t handle, bool(*callback)(void *data, handle_t handle), void *data)
Adds a handle to wait on to the waiter.
void waiter_signal(waiter_t *waiter, wait_record_t *record)
Marks the callback represented by this record to be called, and interrupts the waiter.
wait_record_t * waiter_add_signal(waiter_t *waiter, bool(*callback)(void *data), void *data)
Adds a callback to the waiter that is signalled from another thread.
result_t waiter_wait(waiter_t *waiter, uint64_t timeout)
Waits for handles to signal.