1 #ifndef RBIMPL_INTERN_SELECT_POSIX_H
2 #define RBIMPL_INTERN_SELECT_POSIX_H
23 #include "ruby/internal/config.h"
25 #ifdef HAVE_SYS_SELECT_H
26 # include <sys/select.h>
51 #define rb_fd_zero FD_ZERO
54 #define rb_fd_set FD_SET
57 #define rb_fd_clr FD_CLR
60 #define rb_fd_isset FD_ISSET
63 #define rb_fd_init FD_ZERO
66 #define rb_fd_select select
69 #define rb_fd_copy rb_fd_copy
70 #define rb_fd_dup rb_fd_dup
71 #define rb_fd_ptr rb_fd_ptr
72 #define rb_fd_max rb_fd_max
140 #define rb_fd_init_copy(d, s) (*(d) = *(s))
141 #define rb_fd_term(f) ((void)(f))
Defines RBIMPL_ATTR_CONST.
RBIMPL_ATTR_CONST() int rb_io_oflags_fmode(int oflags)
Converts an oflags (that rb_io_modestr_oflags() returns) to a fmode (that rb_io_mode_flags() returns)...
RBIMPL_ATTR_PURE() int rb_io_read_pending(rb_io_t *fptr)
Queries if the passed IO has any pending reads.
Defines RBIMPL_ATTR_NOALIAS.
#define RBIMPL_ATTR_NOALIAS()
Wraps (or simulates) __declspec((noalias))
Defines RBIMPL_ATTR_NONNULL.
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
static int rb_fd_max(const rb_fdset_t *f)
It seems this function has no use.
static void rb_fd_dup(rb_fdset_t *dst, const fd_set *src)
Destructively overwrites an fdset with another.
fd_set rb_fdset_t
The data structure which wraps the fd_set bitmap used by select(2).
static fd_set * rb_fd_ptr(rb_fdset_t *f)
Raw pointer to fd_set.
static void rb_fd_copy(rb_fdset_t *dst, const fd_set *src, int n)
Destructively overwrites an fdset with another.
#define inline
Old Visual Studio versions do not support the inline keyword, so we need to define it to be __inline.
Defines RBIMPL_ATTR_PURE.
The data structure which wraps the fd_set bitmap used by select(2).