25 #define LELY_IO_TIMER_INLINE extern inline
36 static void io_timer_async_wait_func(
struct ev_task *
task);
49 async_wait->promise = promise;
51 exec, &io_timer_async_wait_func);
56 *pwait = &async_wait->wait;
void ev_promise_release(ev_promise_t *promise)
Releases a reference to a promise.
int ev_promise_set(ev_promise_t *promise, void *value)
Satiesfies a promise, if it was not aready satisfied, and stores the specified value for retrieval by...
ev_future_t * ev_promise_get_future(ev_promise_t *promise)
Returns (a reference to) a future associated with the specified promise.
ev_promise_t * ev_promise_create(size_t size, ev_promise_dtor_t *dtor)
Constructs a new promise with an optional empty shared state.
void * ev_promise_data(const ev_promise_t *promise)
Returns a pointer to the shared state of a promise.
const struct ev_exec_vtbl *const ev_exec_t
An abstract task executor.
This header file is part of the I/O library; it contains the abstract timer interface.
const struct io_timer_vtbl *const io_timer_t
An abstract timer.
void io_timer_submit_wait(io_timer_t *timer, struct io_timer_wait *wait)
Submits a wait operation to an I/O timer.
#define IO_TIMER_WAIT_INIT(exec, func)
The static initializer for io_timer_wait.
This is the public header file of the utilities library.
#define structof(ptr, type, member)
Obtains the address of a structure from the address of one of its members.
This is the internal header file of the I/O library.
A wait operation suitable for use with an I/O timer.
struct io_timer_wait_result r
The result of the wait operation.
struct ev_task task
The task (to be) submitted upon completion (or cancellation) of the wait operation.
ev_future_t * io_timer_async_wait(io_timer_t *timer, ev_exec_t *exec, struct io_timer_wait **pwait)
Submits an asynchronous wait operation to an I/O timer and creates a future which becomes ready once ...
struct io_timer_wait * io_timer_wait_from_task(struct ev_task *task)
Obtains a pointer to an I/O timer wait operation from a pointer to its completion task.