24 #ifndef LELY_IO2_CTX_HPP_ 25 #define LELY_IO2_CTX_HPP_ 53 operator io_ctx_t*()
const noexcept {
return ctx; }
84 if (ec) throw ::std::system_error(ec,
"notify_fork");
102 if (!ctx) util::throw_errc(
"Context");
114 operator=(
Context&& other) noexcept {
116 swap(ctx, other.ctx);
127 #endif // !LELY_IO2_CTX_HPP_ void insert(io_svc &svc) noexcept
This header file is part of the I/O library; it contains the I/O context and service declarations...
A refence to an I/O context. This class is a wrapper around io_ctx_t*.
The event generated after the fork in the child process.
void io_ctx_insert(io_ctx_t *ctx, struct io_svc *svc)
Registers an I/O service with an I/O context.
void io_ctx_shutdown(io_ctx_t *ctx)
Shuts down all registered I/O services in reverse order of registration.
void notify_fork(ForkEvent e)
void set_errc(int errc)
Sets the current (thread-specific) native error code to errc.
void io_ctx_destroy(io_ctx_t *ctx)
Destroys an I/O context.
int io_ctx_notify_fork(io_ctx_t *ctx, enum io_fork_event e)
Notifies all registered I/O services of the specified fork event.
int get_errc(void)
Returns the last (thread-specific) native error code set by a system call or library function...
void io_ctx_remove(io_ctx_t *ctx, struct io_svc *svc)
Unregisters an I/O service with an I/O context.
This header file is part of the utilities library; it contains C++ convenience functions for creating...
void notify_fork(ForkEvent e, ::std::error_code &ec) noexcept
The event generated after the fork in the parent process.
::std::error_code make_error_code(SdoErrc e) noexcept
Creates an error code corresponding to an SDO abort code.
ForkEvent
The type of event generated by an I/O context before and after a process fork.
io_ctx_t * io_ctx_create(void)
Creates a new I/O context.
The event generated before the fork.