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 \
62void *io_tqueue_alloc(
void);
63void io_tqueue_free(
void *ptr);
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.
const struct io_dev_vtbl *const io_dev_t
An abstract I/O device.
This header file is part of the utilities library; it contains the pairing heap declarations.
A wait operation suitable for use with a timer queue.
struct ev_task task
The task (to be) submitted upon completion (or cancellation) of the wait operation.
int errc
The error number, obtained as if by get_errc(), if an error occurred or the operation was canceled.
struct timespec value
The absolute expiration time.
A node in a pairing heap.
A time type with nanosecond resolution.
void io_tqueue_destroy(io_tqueue_t *tq)
Destroys a timer queue.
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.
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.
io_tqueue_t * io_tqueue_create(io_timer_t *timer, ev_exec_t *exec)
Creates a new timer queue.
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.
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.
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.
void io_tqueue_submit_wait(io_tqueue_t *tq, struct io_tqueue_wait *wait)
Submits a wait operation to a timer queue.