22#ifndef LELY_IO2_SIGSET_H_
23#define LELY_IO2_SIGSET_H_
31#if _WIN32 && !defined(SIGHUP)
35#ifndef LELY_IO_SIGSET_INLINE
36#define LELY_IO_SIGSET_INLINE static inline
54#define IO_SIGSET_WAIT_INIT(exec, func) \
56 EV_TASK_INIT(exec, func), 0 \
201 return (*sigset)->get_dev(sigset);
207 return (*sigset)->clear(sigset);
213 return (*sigset)->insert(sigset,
signo);
219 return (*sigset)->remove(sigset,
signo);
225 (*sigset)->submit_wait(sigset, wait);
This header file is part of the event library; it contains the futures and promises declarations.
const struct ev_exec_vtbl *const ev_exec_t
An abstract task executor.
int io_sigset_insert(io_sigset_t *sigset, int signo)
Insert the specified signal number into the set of signals being monitored by a signal handler.
const struct io_sigset_vtbl *const io_sigset_t
An abstract signal handler.
static size_t io_sigset_abort(io_sigset_t *sigset, struct ev_task *task)
void io_sigset_submit_wait(io_sigset_t *sigset, struct io_sigset_wait *wait)
Submits a wait operation to a signal handler.
int io_sigset_remove(io_sigset_t *sigset, int signo)
Removes the specified signal number from the set of signals being monitored by a signal handler.
static size_t io_sigset_abort_wait(io_sigset_t *sigset, struct io_sigset_wait *wait)
Aborts the specified signal wait operation if it is pending.
int io_sigset_clear(io_sigset_t *sigset)
Clears the set of signals being monitored by a signal handler.
static ev_exec_t * io_sigset_get_exec(const io_sigset_t *sigset)
static size_t io_sigset_cancel(io_sigset_t *sigset, struct ev_task *task)
struct io_sigset_wait * io_sigset_wait_from_task(struct ev_task *task)
Obtains a pointer to a signal wait operation from a pointer to its completion task.
io_dev_t * io_sigset_get_dev(const io_sigset_t *sigset)
Returns a pointer to the abstract I/O device representing the signal handler.
static size_t io_sigset_cancel_wait(io_sigset_t *sigset, struct io_sigset_wait *wait)
Cancels the specified signal wait operation if it is pending.
static io_ctx_t * io_sigset_get_ctx(const io_sigset_t *sigset)
This header file is part of the I/O library; it contains the abstract I/O device interface.
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...
const struct io_dev_vtbl *const io_dev_t
An abstract I/O device.
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.
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...
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.
A wait operation suitable for use with a signal handler.
struct ev_task task
The task (to be) submitted upon completion (or cancellation) of the wait operation.
int signo
The signal number, or 0 if the wait operation was canceled.
This header file is part of the event library; it contains the task declarations.