22 #ifndef LELY_IO2_DEV_H_ 23 #define LELY_IO2_DEV_H_ 30 #ifndef LELY_IO_DEV_INLINE 31 #define LELY_IO_DEV_INLINE static inline 42 io_ctx_t *(*get_ctx)(
const io_dev_t *dev);
43 ev_exec_t *(*get_exec)(
const io_dev_t *dev);
44 size_t (*cancel)(io_dev_t *dev,
struct ev_task *task);
45 size_t (*abort)(io_dev_t *dev,
struct ev_task *task);
82 return (*dev)->get_ctx(dev);
88 return (*dev)->get_exec(dev);
94 return (*dev)->cancel(dev, task);
100 return (*dev)->abort(dev, task);
107 #endif // !LELY_IO2_DEV_H_ const struct ev_exec_vtbl *const ev_exec_t
An abstract task executor.
ev_exec_t * io_dev_get_exec(const io_dev_t *dev)
Returns a pointer to the executor used by the I/O device to execute asynchronous tasks.
This is the public header file of the I/O library.
size_t io_dev_cancel(io_dev_t *dev, struct ev_task *task)
Cancels the asynchronous operation submitted to *dev, if its task has not yet been submitted to its e...
This is the public header file of the event library.
This header file is part of the C11 and POSIX compatibility library; it includes <stddef.h> and defines any missing functionality.
size_t io_dev_abort(io_dev_t *dev, struct ev_task *task)
Aborts the asynchronous operation submitted to *dev, if its task has not yet been submitted to its ex...
io_ctx_t * io_dev_get_ctx(const io_dev_t *dev)
Returns a pointer to the I/O context with which the I/O device is registered.
const struct io_dev_vtbl *const io_dev_t
An abstract I/O device.