Lely core libraries
2.3.4
|
Go to the documentation of this file.
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);
244 #endif // !LELY_IO2_SIGSET_H_
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.
const struct ev_exec_vtbl *const ev_exec_t
An abstract task executor.
void io_sigset_submit_wait(io_sigset_t *sigset, struct io_sigset_wait *wait)
Submits a wait operation to a signal handler.
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.
ev_future_t * io_sigset_async_wait(io_sigset_t *sigset, ev_exec_t *exec, struct io_sigset_wait **pwait)
Submits an asynchronous wait operation to a signal handler and creates a future which becomes ready o...
A wait operation suitable for use with a signal handler.
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...
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.
const struct io_sigset_vtbl *const io_sigset_t
An abstract 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.
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)
int signo
The signal number, or 0 if the wait operation was canceled.
static size_t io_sigset_abort(io_sigset_t *sigset, struct ev_task *task)
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.
int io_sigset_clear(io_sigset_t *sigset)
Clears the set of signals being monitored by a signal handler.
static io_ctx_t * io_sigset_get_ctx(const io_sigset_t *sigset)
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.
const struct io_dev_vtbl *const io_dev_t
An abstract I/O device.
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.
struct ev_task task
The task (to be) submitted upon completion (or cancellation) of the wait operation.
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...