22#ifndef LELY_IO_POLL_HPP_
23#define LELY_IO_POLL_HPP_
26#error "include <lely/io/poll.h> for the C interface"
45 typedef value_type& reference;
46 typedef const value_type& const_reference;
47 typedef value_type* pointer;
48 typedef const value_type* const_pointer;
52 return __io_poll_alloc();
55 free(
void* ptr)
noexcept {
60 init(pointer p)
noexcept {
61 return __io_poll_init(p);
64 fini(pointer p)
noexcept {
70class IOPoll :
public incomplete_c_type<__io_poll> {
71 typedef incomplete_c_type<__io_poll> c_base;
74 IOPoll() : c_base() {}
78 bool keep =
false)
noexcept {
83 wait(
int maxevents,
struct io_event* events,
int timeout = 0)
noexcept {
88 signal(
unsigned char sig)
noexcept {
This header file is part of the utilities library; it contains the C to C++ interface declarations.
An opaque I/O polling interface type.
struct io_handle * io_handle_t
An opaque I/O device handle type.
This header file is part of the I/O library; it contains I/O polling interface declarations.
int io_poll_watch(io_poll_t *poll, io_handle_t handle, struct io_event *event, int keep)
Registers an I/O device with an I/O polling interface and instructs it to watch for certain events.
struct __io_poll io_poll_t
An opaque I/O polling interface type.
int io_poll_signal(io_poll_t *poll, unsigned char sig)
Generates a signal event.
int io_poll_wait(io_poll_t *poll, int maxevents, struct io_event *events, int timeout)
Waits at most timeout milliseconds for at most maxevents I/O events to occur for any of the I/O devic...
An I/O polling interface.
A class template supplying a uniform interface to certain attributes of C types.