26 #ifndef LELY_IO2_TQUEUE_H_ 27 #define LELY_IO2_TQUEUE_H_ 53 #define IO_TQUEUE_WAIT_INIT(sec, nsec, exec, func) \ 55 { (sec), (nsec) }, EV_TASK_INIT(exec, func), 0, PNODE_INIT \ 62 void *io_tqueue_alloc(
void);
63 void io_tqueue_free(
void *ptr);
148 #endif // !LELY_IO2_TQUEUE_H_ size_t io_tqueue_cancel_wait(io_tqueue_t *tq, struct io_tqueue_wait *wait)
Cancels the specified timer queue wait operation if it is pending.
const struct ev_exec_vtbl *const ev_exec_t
An abstract task executor.
struct timespec value
The absolute expiration time.
io_timer_t * io_tqueue_get_timer(const io_tqueue_t *tq)
Returns a pointer to the I/O timer used by the timer queue.
ev_future_t * io_tqueue_async_wait(io_tqueue_t *tq, ev_exec_t *exec, const struct timespec *value, struct io_tqueue_wait **pwait)
Submits an asynchronous wait operation to a timer queue and creates a future which becomes ready once...
A wait operation suitable for use with a timer queue.
This header file is part of the I/O library; it contains the abstract timer interface.
int errc
The error number, obtained as if by get_errc(), if an error occurred or the operation was canceled...
io_tqueue_t * io_tqueue_create(io_timer_t *timer, ev_exec_t *exec)
Creates a new timer queue.
This header file is part of the utilities library; it contains the pairing heap declarations.
struct ev_task task
The task (to be) submitted upon completion (or cancellation) of the wait operation.
void io_tqueue_submit_wait(io_tqueue_t *tq, struct io_tqueue_wait *wait)
Submits a wait operation to a timer queue.
size_t io_tqueue_abort_wait(io_tqueue_t *tq, struct io_tqueue_wait *wait)
Aborts the specified timer queue wait operation if it is pending.
const struct io_timer_vtbl *const io_timer_t
An abstract timer.
void io_tqueue_destroy(io_tqueue_t *tq)
Destroys a timer queue.
io_dev_t * io_tqueue_get_dev(const io_tqueue_t *tq)
Returns a pointer to the abstract I/O device representing the timer queue.
const struct io_dev_vtbl *const io_dev_t
An abstract I/O device.
struct io_tqueue_wait * io_tqueue_wait_from_task(struct ev_task *task)
Obtains a pointer to a timer queue wait operation from a pointer to its completion task...
A node in a pairing heap.