25 #ifndef LELY_IO2_CTX_H_ 26 #define LELY_IO2_CTX_H_ 57 #define IO_SVC_INIT(vptr) \ 59 (vptr), 0, { NULL, NULL } \ 79 void (*shutdown)(
struct io_svc *svc);
82 void *io_ctx_alloc(
void);
83 void io_ctx_free(
void *ptr);
147 #endif // !LELY_IO2_CTX_H_ The event generated after the fork in the child process.
io_fork_event
The type of event generated by an I/O context before and after a process fork.
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.
This is the public header file of the I/O library.
void io_ctx_destroy(io_ctx_t *ctx)
Destroys an I/O context.
const struct io_svc_vtbl * vptr
A pointer to the virtual table for the I/O service.
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.
This header file is part of the utilities library; it contains the doubly-linked list declarations...
A node in a doubly-linked list.
void io_ctx_remove(io_ctx_t *ctx, struct io_svc *svc)
Unregisters an I/O service with an I/O context.
The virtual table of an I/O service.
The event generated after the fork in the parent process.
io_ctx_t * io_ctx_create(void)
Creates a new I/O context.
The event generated before the fork.