1#ifndef RBIMPL_INTERN_SELECT_WIN32_H
2#define RBIMPL_INTERN_SELECT_WIN32_H
31#define rb_fd_zero rb_fd_zero
32#define rb_fd_clr rb_fd_clr
33#define rb_fd_isset rb_fd_isset
34#define rb_fd_copy rb_fd_copy
35#define rb_fd_dup rb_fd_dup
36#define rb_fd_ptr rb_fd_ptr
37#define rb_fd_max rb_fd_max
124 f->fdset->fd_count = 0;
138 rb_w32_fdclr(n, f->fdset);
153 return rb_w32_fdisset(n, f->fdset);
214 return rb_w32_select(
216 rfds ? rfds->
fdset : NULL,
217 wfds ? wfds->
fdset : NULL,
218 efds ? efds->
fdset : NULL,
253 const fd_set *p = f->fdset;
256 return RBIMPL_CAST((
int)p->fd_count);
#define RBIMPL_ASSERT_OR_ASSUME(...)
This is either RUBY_ASSERT or RBIMPL_ASSUME, depending on RUBY_DEBUG.
Tweaking visibility of C variables/functions.
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Support for so-called dosish systems.
static int rb_fd_max(const rb_fdset_t *f)
It seems this function has no use.
void rb_w32_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src)
Identical to rb_w32_fd_copy(), except it copies unlimited number of file descriptors.
void rb_w32_fd_copy(rb_fdset_t *dst, const fd_set *src, int max)
Destructively overwrites an fdset with another.
static void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src)
Identical to rb_fd_copy(), except it copies unlimited number of file descriptors.
void rb_fd_term(rb_fdset_t *f)
Destroys the rb_fdset_t, releasing any memory and resources it used.
static fd_set * rb_fd_ptr(const 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.
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))
#define rb_fd_isset
Queries if the given fd is in the rb_fdset_t.
#define rb_fd_select
Waits for multiple file descriptors at once.
#define rb_fd_init
Initialises the :given :rb_fdset_t.
#define rb_fd_set
Sets the given fd to the rb_fdset_t.
#define rb_fd_zero
Clears the given rb_fdset_t.
#define rb_fd_clr
Unsets the given fd from the rb_fdset_t.
#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.
#define RBIMPL_ATTR_PURE()
Wraps (or simulates) __attribute__((pure))
#define RBIMPL_ATTR_PURE_UNLESS_DEBUG()
Enables RBIMPL_ATTR_PURE if and only if.
The data structure which wraps the fd_set bitmap used by select(2).
fd_set * fdset
File descriptors buffer.
int capa
Maximum allowed number of FDs.