Lely core libraries
2.3.4
|
Go to the documentation of this file.
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_
struct timespec value
The absolute expiration time.
A node in a pairing heap.
void io_tqueue_submit_wait(io_tqueue_t *tq, struct io_tqueue_wait *wait)
Submits a wait operation to a timer queue.
const struct ev_exec_vtbl *const ev_exec_t
An abstract task executor.
int errc
The error number, obtained as if by get_errc(), if an error occurred or the operation was canceled.
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 wait operation suitable for use with a 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...
struct ev_task task
The task (to be) submitted upon completion (or cancellation) of the wait operation.
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_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_destroy(io_tqueue_t *tq)
Destroys a timer queue.
const struct io_dev_vtbl *const io_dev_t
An abstract I/O device.
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 io_timer_vtbl *const io_timer_t
An abstract timer.
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_tqueue_t * io_tqueue_create(io_timer_t *timer, ev_exec_t *exec)
Creates a new timer queue.