Ruby: include/ruby/internal/intern/select.h Source File

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

select.h
Go to the documentation of this file.
1#ifndef RBIMPL_INTERN_SELECT_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_INTERN_SELECT_H
25#include "ruby/internal/config.h"
26
27#ifdef HAVE_SYS_TYPES_H
28# include <sys/types.h> /* for NFDBITS (BSD Net/2) */
29#endif
30
31#include "ruby/internal/dllexport.h"
32
33/* thread.c */
34#if defined(NFDBITS) && defined(HAVE_RB_FD_INIT)
35# include "ruby/internal/intern/select/largesize.h"
36#elif defined(_WIN32)
37# include "ruby/internal/intern/select/win32.h"
38#
39# define rb_fd_resize(n, f) ((void)(f))
40#else
41# include "ruby/internal/intern/select/posix.h"
42#
43# define rb_fd_resize(n, f) ((void)(f))
44#endif
45
46 RBIMPL_SYMBOL_EXPORT_BEGIN()
47
48struct timeval;
49
82int rb_thread_fd_select(int nfds, rb_fdset_t *rfds, rb_fdset_t *wfds, rb_fdset_t *efds, struct timeval *timeout);
83
84 RBIMPL_SYMBOL_EXPORT_END()
85
86#endif /* RBIMPL_INTERN_SELECT_H */
dllexport.h
Tweaking visibility of C variables/functions.
RBIMPL_SYMBOL_EXPORT_END
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition dllexport.h:106
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition dllexport.h:97
win32.h
Public APIs to provide rb_fd_select().
largesize.h
Public APIs to provide rb_fd_select().
posix.h
Public APIs to provide rb_fd_select().
rb_thread_fd_select
int rb_thread_fd_select(int nfds, rb_fdset_t *rfds, rb_fdset_t *wfds, rb_fdset_t *efds, struct timeval *timeout)
Waits for multiple file descriptors at once.
Definition thread.c:4201
rb_fdset_t
The data structure which wraps the fd_set bitmap used by select(2).
Definition largesize.h:71
timeval
Definition missing.h:63