Ruby 2.0.0p353(2013-11-22revision43784)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Macros | Typedefs | Functions
io.h File Reference
`#include <stdio.h>`
`#include <errno.h>`
`#include "ruby/encoding.h"`
`#include "ruby/config.h"`
Include dependency graph for io.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | rb_io_buffer_t
struct | rb_io_t
struct | rb_io_t::rb_io_enc_t

## Macros
#define | RB_WAITFD_IN 0x001
#define | RB_WAITFD_PRI 0x002
#define | RB_WAITFD_OUT 0x004
#define | HAVE_RB_IO_T 1
#define | FMODE_READABLE 0x00000001
#define | FMODE_WRITABLE 0x00000002
#define | FMODE_READWRITE (FMODE_READABLE|FMODE_WRITABLE)
#define | FMODE_BINMODE 0x00000004
#define | FMODE_SYNC 0x00000008
#define | FMODE_TTY 0x00000010
#define | FMODE_DUPLEX 0x00000020
#define | FMODE_APPEND 0x00000040
#define | FMODE_CREATE 0x00000080
#define | FMODE_WSPLIT 0x00000200
#define | FMODE_WSPLIT_INITIALIZED 0x00000400
#define | FMODE_TRUNC 0x00000800
#define | FMODE_TEXTMODE 0x00001000
#define | FMODE_SETENC_BY_BOM 0x00100000
#define | GetOpenFile(obj, fp) rb_io_check_closed((fp) = RFILE(rb_io_taint_check(obj))->fptr)
#define | RB_IO_BUFFER_INIT(buf)
#define | MakeOpenFile(obj, fp)
#define | RB_IO_FPTR_NEW(fp)
#define | rb_io_mode_flags(modestr) rb_io_modestr_fmode(modestr)
#define | rb_io_modenum_flags(oflags) rb_io_oflags_fmode(oflags)

## Typedefs
typedef struct rb_io_t | rb_io_t

## Functions
FILE * | rb_io_stdio_file (rb_io_t *fptr)
FILE * | rb_fdopen (int, const char *)
int | rb_io_modestr_fmode (const char *modestr)
int | rb_io_modestr_oflags (const char *modestr)
int | rb_io_oflags_fmode (int oflags)
void | rb_io_check_writable (rb_io_t *)
void | rb_io_check_readable (rb_io_t *)
void | rb_io_check_char_readable (rb_io_t *fptr)
void | rb_io_check_byte_readable (rb_io_t *fptr)
int | rb_io_fptr_finalize (rb_io_t *)
void | rb_io_synchronized (rb_io_t *)
void | rb_io_check_initialized (rb_io_t *)
void | rb_io_check_closed (rb_io_t *)
VALUE | rb_io_get_io (VALUE io)
VALUE | rb_io_check_io (VALUE io)
VALUE | rb_io_get_write_io (VALUE io)
VALUE | rb_io_set_write_io (VALUE io, VALUE w)
int | rb_io_wait_readable (int)
int | rb_io_wait_writable (int)
int | rb_wait_for_single_fd (int fd, int events, struct timeval *tv)
void | rb_io_set_nonblock (rb_io_t *fptr)
int | rb_io_extract_encoding_option (VALUE opt, rb_encoding **enc_p, rb_encoding **enc2_p, int *fmode_p)
ssize_t | rb_io_bufwrite (VALUE io, const void *buf, size_t size)
VALUE | rb_io_taint_check (VALUE)
| NORETURN (void rb_eof_error(void))
void | rb_io_read_check (rb_io_t *)
int | rb_io_read_pending (rb_io_t *)
| DEPRECATED (void rb_read_check(FILE *))

## Macro Definition Documentation

#define FMODE_APPEND 0x00000040

Definition at line 110 of file io.h.

Referenced by rb_io_fmode_modestr(), rb_io_fmode_oflags(), rb_io_modestr_fmode(), rb_io_oflags_fmode(), strio_putc(), and strio_write().

#define FMODE_BINMODE 0x00000004

Definition at line 106 of file io.h.

Referenced by argf_next_argv(), extract_binmode(), io_reopen(), prep_io(), rb_file_open_internal(), rb_io_ascii8bit_binmode(), rb_io_binmode(), rb_io_binmode_p(), rb_io_extract_modeenc(), rb_io_fmode_oflags(), rb_io_init_copy(), rb_io_modestr_fmode(), rb_io_oflags_fmode(), rb_io_s_pipe(), and validate_enc_binmode().

#define FMODE_CREATE 0x00000080

Definition at line 111 of file io.h.

Referenced by rb_io_fmode_modestr(), rb_io_fmode_oflags(), rb_io_modestr_fmode(), and rb_io_oflags_fmode().

#define FMODE_DUPLEX 0x00000020

Definition at line 109 of file io.h.

Referenced by io_check_tty(), io_unread(), pipe_open(), pty_open(), rb_io_close_read(), rb_io_close_write(), and rsock_init_sock().

#define FMODE_READABLE 0x00000001

Definition at line 103 of file io.h.

Referenced by argf_next_argv(), bsock_close_read(), bsock_close_write(), do_writeconv(), fptr_finalize(), Init_IO(), io_reopen(), pipe_open(), prep_stdio(), rb_f_backquote(), rb_io_check_char_readable(), rb_io_close_read(), rb_io_close_write(), rb_io_extract_modeenc(), rb_io_flush(), rb_io_fmode_modestr(), rb_io_fmode_oflags(), rb_io_modestr_fmode(), rb_io_oflags_fmode(), rb_io_sysseek(), strio_init(), strio_set_string(), and validate_enc_binmode().

#define FMODE_READWRITE (FMODE_READABLE|FMODE_WRITABLE)

Definition at line 105 of file io.h.

Referenced by pty_open(), rb_io_fmode_modestr(), rb_io_fmode_oflags(), rb_io_initialize(), rb_io_modestr_fmode(), rb_io_oflags_fmode(), rb_io_reopen(), rsock_init_sock(), strio_finalize(), strio_init(), and strio_set_string().

#define FMODE_SETENC_BY_BOM 0x00100000

Definition at line 118 of file io.h.

Referenced by parse_mode_enc(), rb_file_open_generic(), rb_io_ext_int_to_encs(), rb_io_initialize(), and rb_io_modestr_fmode().

#define FMODE_SYNC 0x00000008

Definition at line 107 of file io.h.

Referenced by console_dev(), Init_IO(), io_binwrite(), pipe_open(), pty_getpty(), pty_open(), rb_io_sync(), and rb_io_synchronized().

#define FMODE_TEXTMODE 0x00001000

Definition at line 116 of file io.h.

Referenced by extract_binmode(), rb_io_ascii8bit_binmode(), rb_io_binmode(), rb_io_modestr_fmode(), rb_io_s_pipe(), and validate_enc_binmode().

#define FMODE_TRUNC 0x00000800

Definition at line 115 of file io.h.

Referenced by rb_io_fmode_oflags(), rb_io_modestr_fmode(), and rb_io_oflags_fmode().

#define FMODE_TTY 0x00000010

Definition at line 108 of file io.h.

Referenced by io_binwrite(), io_check_tty(), io_fwrite(), pty_open(), and rb_io_getbyte().

#define FMODE_WRITABLE 0x00000002

Definition at line 104 of file io.h.

Referenced by argf_next_argv(), bsock_close_read(), bsock_close_write(), fptr_finalize(), Init_IO(), io_reopen(), pipe_open(), rb_file_flock(), rb_file_size(), rb_io_check_writable(), rb_io_close_read(), rb_io_close_write(), rb_io_external_encoding(), rb_io_extract_modeenc(), rb_io_flush(), rb_io_fmode_modestr(), rb_io_fmode_oflags(), rb_io_modestr_fmode(), rb_io_oflags_fmode(), rb_io_reopen(), rb_io_sysseek(), and strio_init().

#define FMODE_WSPLIT 0x00000200

Definition at line 113 of file io.h.

Referenced by wsplit_p().

#define FMODE_WSPLIT_INITIALIZED 0x00000400

Definition at line 114 of file io.h.

Referenced by wsplit_p().

#define GetOpenFile | ( |  | obj,
|  |  | fp
| ) |  | rb_io_check_closed((fp) = RFILE(rb_io_taint_check(obj))->fptr)

Definition at line 120 of file io.h.

Referenced by argf_next_argv(), argf_set_encoding(), bsock_close_read(), bsock_close_write(), bsock_do_not_reverse_lookup(), bsock_do_not_reverse_lookup_set(), bsock_getpeername(), bsock_getsockname(), bsock_getsockopt(), bsock_local_address(), bsock_remote_address(), bsock_s_for_fd(), bsock_setsockopt(), bsock_shutdown(), check_exec_redirect_fd(), console_dev(), console_echo_p(), console_iflush(), console_ioflush(), console_oflush(), console_set_cooked(), console_set_echo(), console_set_raw(), copy_stream_body(), get_write_fd(), io_getpartial(), io_nread(), io_read(), io_ready_p(), io_reopen(), io_set_encoding_by_bom(), io_wait_readable(), io_wait_writable(), io_write(), ip_addr(), ip_peeraddr(), ossl_obj2bio(), ossl_ssl_read_internal(), ossl_ssl_setup(), ossl_ssl_write_internal(), ossl_start_ssl(), prep_stdio(), prepare_getline_args(), rb_dlptr_s_to_ptr(), rb_f_backquote(), rb_fiddle_ptr_s_to_ptr(), rb_file_atime(), rb_file_chmod(), rb_file_chown(), rb_file_ctime(), rb_file_flock(), rb_file_lstat(), rb_file_mtime(), rb_file_size(), rb_io_advise(), rb_io_ascii8bit_binmode(), rb_io_autoclose_p(), rb_io_binmode(), rb_io_binmode_p(), rb_io_bufread(), rb_io_bufwrite(), rb_io_check_char_readable(), rb_io_close_read(), rb_io_close_write(), rb_io_each_byte(), rb_io_each_char(), rb_io_each_codepoint(), rb_io_eof(), rb_io_external_encoding(), rb_io_fileno(), rb_io_flush(), rb_io_getbyte(), rb_io_getc(), rb_io_getline_1(), rb_io_init_copy(), rb_io_internal_encoding(), rb_io_isatty(), rb_io_lineno(), rb_io_pid(), rb_io_rewind(), rb_io_s_pipe(), rb_io_seek(), rb_io_set_autoclose(), rb_io_set_encoding(), rb_io_set_lineno(), rb_io_set_pos(), rb_io_stat(), rb_io_sync(), rb_io_sysread(), rb_io_sysseek(), rb_io_syswrite(), rb_io_tell(), rb_io_ungetbyte(), rb_io_ungetc(), rb_io_write_nonblock(), rb_ioctl(), rb_stat(), readline_s_set_input(), readline_s_set_output(), rsock_bsock_send(), rsock_io_socket_addrinfo(), rsock_s_recvfrom(), rsock_s_recvfrom_nonblock(), rsock_sock_listen(), select_internal(), sock_accept(), sock_accept_nonblock(), sock_bind(), sock_connect(), sock_connect_nonblock(), sock_sysaccept(), tcp_accept(), tcp_accept_nonblock(), tcp_sysaccept(), ttymode(), udp_bind(), udp_connect(), and udp_send().

#define HAVE_RB_IO_T 1

Definition at line 101 of file io.h.

#define MakeOpenFile | ( |  | obj,
|  |  | fp
| ) |  |

Value:
do {\
if (RFILE(obj)->fptr) {\
rb_io_close(obj);\
rb_io_fptr_finalize(RFILE(obj)->fptr);\
RFILE(obj)->fptr = 0;\
}\
(fp) = 0;\
RB_IO_FPTR_NEW(fp);\
RFILE(obj)->fptr = (fp);\
} while (0)
RFILE
#define RFILE(obj)
rb_io_fptr_finalize
int rb_io_fptr_finalize(rb_io_t *)
Definition: io.c:4186
obj
static VALUE VALUE obj
Definition: tcltklib.c:3158
RB_IO_FPTR_NEW
#define RB_IO_FPTR_NEW(fp)
Definition: io.h:140
if
if(RB_TYPE_P(r, T_FLOAT))
Definition: bigdecimal.c:1186
rb_io_close
VALUE rb_io_close(VALUE)
Definition: io.c:4221

Definition at line 129 of file io.h.

Referenced by pipe_open(), prep_io(), pty_getpty(), pty_open(), rb_file_open_generic(), rb_io_init_copy(), rb_io_initialize(), and rsock_init_sock().

#define RB_IO_BUFFER_INIT | ( |  | buf | ) |

Value:
do {\
(buf).ptr = NULL;\
(buf).off = 0;\
(buf).len = 0;\
(buf).capa = 0;\
} while (0)
buf
unsigned char buf[MIME_BUF_SIZE]
Definition: nkf.c:4308
ptr
return ptr
Definition: tcltklib.c:784
NULL
#define NULL
Definition: _sdbm.c:103
len
size_t len
Definition: tcltklib.c:3568

Definition at line 122 of file io.h.

#define RB_IO_FPTR_NEW | ( |  | fp | ) |

Value:
do {\
(fp) = ALLOC(rb_io_t);\
(fp)->fd = -1;\
(fp)->stdio_file = NULL;\
(fp)->mode = 0;\
(fp)->pid = 0;\
(fp)->lineno = 0;\
(fp)->pathv = Qnil;\
(fp)->finalize = 0;\
RB_IO_BUFFER_INIT((fp)->wbuf);\
RB_IO_BUFFER_INIT((fp)->rbuf);\
RB_IO_BUFFER_INIT((fp)->cbuf);\
(fp)->readconv = NULL;\
(fp)->writeconv = NULL;\
(fp)->writeconv_asciicompat = Qnil;\
(fp)->writeconv_pre_ecflags = 0;\
(fp)->writeconv_pre_ecopts = Qnil;\
(fp)->writeconv_initialized = 0;\
(fp)->tied_io_for_writing = 0;\
(fp)->encs.enc = NULL;\
(fp)->encs.enc2 = NULL;\
(fp)->encs.ecflags = 0;\
(fp)->encs.ecopts = Qnil;\
(fp)->write_lock = 0;\
} while (0)
ALLOC
#define ALLOC(type)
rb_io_t
Definition: io.h:63
lineno
gz lineno
Definition: zlib.c:2270
Qnil
#define Qnil
Definition: tcltklib.c:1896
mode
VALUE mode
Definition: tcltklib.c:1664
RB_IO_BUFFER_INIT
#define RB_IO_BUFFER_INIT(buf)
Definition: io.h:122
NULL
#define NULL
Definition: _sdbm.c:103
cbuf
gz cbuf
Definition: zlib.c:2278

Definition at line 140 of file io.h.

#define rb_io_mode_flags | ( |  | modestr | ) | rb_io_modestr_fmode(modestr)

Definition at line 192 of file io.h.

Referenced by pty_getpty(), and strio_init().

#define rb_io_modenum_flags | ( |  | oflags | ) | rb_io_oflags_fmode(oflags)

Definition at line 193 of file io.h.

Referenced by strio_init().

#define RB_WAITFD_IN 0x001

Definition at line 47 of file io.h.

Referenced by io_wait_readable(), rb_thread_wait_fd_rw(), rb_wait_for_single_fd(), select_single(), and wait_connectable().

#define RB_WAITFD_OUT 0x004

Definition at line 49 of file io.h.

Referenced by io_wait_writable(), rb_thread_wait_fd_rw(), rb_wait_for_single_fd(), select_single(), and wait_connectable().

#define RB_WAITFD_PRI 0x002

Definition at line 48 of file io.h.

Referenced by rb_wait_for_single_fd(), and select_single().

## Typedef Documentation

typedef struct rb_io_t rb_io_t

## Function Documentation

DEPRECATED | ( | void | rb_read_checkFILE * | ) |

NORETURN | ( | void | rb_eof_errorvoid | ) |

FILE* rb_fdopen | ( | int | ,
|  | const char * |
| ) |  |

Definition at line 5279 of file io.c.

References errno, NULL, rb_gc(), rb_sys_fail(), and rb_warn().

Referenced by rb_io_stdio_file().

ssize_t rb_io_bufwrite | ( | VALUE | io,
|  | const void * | buf,
|  | size_t | size
| ) |  |

Definition at line 1352 of file io.c.

References binwrite_arg::fptr, GetOpenFile, io_binwrite(), and rb_io_check_writable().

void rb_io_check_byte_readable | ( | rb_io_t * | fptr | ) |

Definition at line 772 of file io.c.

References rb_eIOError, rb_io_check_char_readable(), rb_raise(), and READ_CHAR_PENDING.

Referenced by copy_stream_body(), io_getpartial(), io_read(), rb_io_check_readable(), rb_io_each_byte(), rb_io_getbyte(), rb_io_sysread(), and rb_io_ungetbyte().

void rb_io_check_char_readable | ( | rb_io_t * | fptr | ) |

Definition at line 753 of file io.c.

References FMODE_READABLE, GetOpenFile, io_fflush(), rb_io_buffer_t::len, rb_io_t::mode, rb_eIOError, rb_io_check_closed(), rb_raise(), rb_sys_fail(), rb_io_t::tied_io_for_writing, and rb_io_t::wbuf.

Referenced by io_read(), rb_io_check_byte_readable(), rb_io_each_char(), rb_io_each_codepoint(), rb_io_eof(), rb_io_getc(), rb_io_getline_1(), rb_io_lineno(), rb_io_set_lineno(), and rb_io_ungetc().

void rb_io_check_closed | ( | rb_io_t * |  | ) |

Definition at line 604 of file io.c.

References rb_io_t::fd, rb_eIOError, rb_io_check_initialized(), and rb_raise().

Referenced by bsock_getsockopt(), bsock_setsockopt(), io_binwrite(), io_bufread(), io_fflush(), io_unread(), io_wait_readable(), io_wait_writable(), rb_file_flock(), rb_io_check_char_readable(), rb_io_check_writable(), rb_io_close_m(), rb_io_sysread(), rsock_s_recvfrom(), and rsock_s_recvfrom_nonblock().

void rb_io_check_initialized | ( | rb_io_t * |  | ) |

Definition at line 596 of file io.c.

References rb_eIOError, and rb_raise().

Referenced by rb_file_path(), rb_io_check_closed(), rb_io_closed(), rb_io_get_write_io(), rb_io_set_write_io(), and rb_io_synchronized().

VALUE rb_io_check_io | ( | VALUE | io | ) |

Definition at line 620 of file io.c.

References rb_check_convert_type(), and T_FILE.

Referenced by argf_external_encoding(), argf_internal_encoding(), check_exec_redirect(), io_write(), rb_io_reopen(), and rb_io_s_try_convert().

void rb_io_check_readable | ( | rb_io_t * |  | ) |

Definition at line 781 of file io.c.

References rb_io_check_byte_readable().

Referenced by io_nread(), io_ready_p(), io_wait_readable(), ossl_obj2bio(), ossl_ssl_setup(), and rb_io_bufread().

void rb_io_check_writable | ( | rb_io_t * |  | ) |

Definition at line 805 of file io.c.

References FMODE_WRITABLE, io_unread(), rb_io_buffer_t::len, rb_io_t::mode, rb_eIOError, rb_io_check_closed(), rb_raise(), and rb_io_t::rbuf.

Referenced by copy_stream_body(), io_wait_writable(), io_write(), ossl_ssl_setup(), rb_io_bufwrite(), rb_io_syswrite(), and rb_io_write_nonblock().

int rb_io_extract_encoding_option | ( | VALUE | opt,
|  | rb_encoding ** | enc_p,
|  | rb_encoding ** | enc2_p,
|  | int * | fmode_p
| ) |  |

Definition at line 4986 of file io.c.

References idx, NIL_P(), NULL, p, parse_mode_enc(), Qnil, Qundef, rb_check_string_type(), rb_enc_from_index(), rb_enc_name, rb_hash_lookup2(), rb_io_ext_int_to_encs(), rb_to_encoding(), rb_to_encoding_index(), rb_warn(), ruby_verbose, StringValueCStr, sym_encoding, sym_extenc, sym_intenc, tmp, and v.

Referenced by rb_gzfile_ecopts(), and rb_io_extract_modeenc().

int rb_io_fptr_finalize | ( | rb_io_t * |  | ) |

Definition at line 4186 of file io.c.

References clear_codeconv(), rb_io_t::fd, free, rb_io_t::pathv, rb_io_buffer_t::ptr, Qnil, rb_io_fptr_cleanup(), rb_io_t::rbuf, TRUE, rb_io_t::wbuf, and rb_io_t::write_lock.

Referenced by make_io_deferred(), and pipe_atexit().

VALUE rb_io_get_io | ( | VALUE | io | ) |

Definition at line 614 of file io.c.

References rb_convert_type(), and T_FILE.

VALUE rb_io_get_write_io | ( | VALUE | io | ) |

Definition at line 626 of file io.c.

References io, rb_io_check_initialized(), and RFILE.

int rb_io_modestr_fmode | ( | const char * | modestr | ) |

Definition at line 4726 of file io.c.

References fmode, FMODE_APPEND, FMODE_BINMODE, FMODE_CREATE, FMODE_READABLE, FMODE_READWRITE, FMODE_SETENC_BY_BOM, FMODE_TEXTMODE, FMODE_TRUNC, FMODE_WRITABLE, io_encname_bom_p(), m, NULL, p, rb_eArgError, and rb_raise().

Referenced by rb_file_open_internal(), rb_io_extract_modeenc(), and rb_io_modestr_oflags().

int rb_io_modestr_oflags | ( | const char * | modestr | ) |

Definition at line 4845 of file io.c.

References rb_io_fmode_oflags(), and rb_io_modestr_fmode().

Referenced by check_exec_redirect(), and rb_io_s_sysopen().

int rb_io_oflags_fmode | ( | int | oflags | ) |

Definition at line 4775 of file io.c.

References fmode, FMODE_APPEND, FMODE_BINMODE, FMODE_CREATE, FMODE_READABLE, FMODE_READWRITE, FMODE_TRUNC, FMODE_WRITABLE, and O_BINARY.

Referenced by rb_io_extract_modeenc(), rb_io_fdopen(), and rb_io_initialize().

void rb_io_read_check | ( | rb_io_t * |  | ) |

Definition at line 834 of file io.c.

References rb_io_t::fd, rb_thread_wait_fd(), and READ_DATA_PENDING.

int rb_io_read_pending | ( | rb_io_t * |  | ) |

Definition at line 817 of file io.c.

References READ_CHAR_PENDING, and READ_DATA_PENDING.

Referenced by io_nread(), io_ready_p(), io_wait_readable(), rsock_s_recvfrom(), and rsock_s_recvfrom_nonblock().

void rb_io_set_nonblock | ( | rb_io_t * | fptr | ) |

Definition at line 2338 of file io.c.

References F_SETFL, fcntl(), rb_io_t::fd, O_NONBLOCK, rb_io_t::pathv, and rb_sys_fail_path.

Referenced by io_getpartial(), rb_io_write_nonblock(), rsock_s_accept_nonblock(), rsock_s_recvfrom_nonblock(), and sock_connect_nonblock().

VALUE rb_io_set_write_io | ( | VALUE | io,
|  | VALUE | w
| ) |  |

Definition at line 638 of file io.c.

References GetWriteIO, Qnil, rb_io_check_initialized(), RFILE, and RTEST.

Referenced by argf_close(), and argf_next_argv().

FILE* rb_io_stdio_file | ( | rb_io_t * | fptr | ) |

Definition at line 7154 of file io.c.

References rb_io_t::fd, rb_io_t::mode, rb_fdopen(), rb_io_fmode_oflags(), rb_io_oflags_modestr(), and rb_io_t::stdio_file.

Referenced by rb_dlptr_s_to_ptr(), rb_fiddle_ptr_s_to_ptr(), readline_s_set_input(), and readline_s_set_output().

void rb_io_synchronized | ( | rb_io_t * |  | ) |

Definition at line 5544 of file io.c.

References FMODE_SYNC, rb_io_t::mode, and rb_io_check_initialized().

Referenced by pipe_open(), rb_io_s_pipe(), rb_io_unbuffered(), and rsock_init_sock().

VALUE rb_io_taint_check | ( | VALUE |  | ) |

Definition at line 587 of file io.c.

References io, OBJ_UNTRUSTED, rb_check_frozen, rb_eSecurityError, rb_raise(), and rb_safe_level.

Referenced by get_strio(), rb_file_path(), rb_io_inspect(), rb_io_reopen(), strio_reopen(), and strio_set_string().

int rb_io_wait_readable | ( | int |  | ) |

Definition at line 1064 of file io.c.

References errno, EWOULDBLOCK, FALSE, rb_eIOError, rb_raise(), rb_thread_check_ints(), rb_thread_wait_fd(), and TRUE.

Referenced by io_bufread(), io_fillbuf(), io_getpartial(), ossl_ssl_read_internal(), ossl_ssl_write_internal(), ossl_start_ssl(), rsock_s_accept(), and rsock_s_recvfrom().

int rb_io_wait_writable | ( | int |  | ) |

Definition at line 1090 of file io.c.

References errno, EWOULDBLOCK, FALSE, rb_eIOError, rb_raise(), rb_thread_check_ints(), rb_thread_fd_writable(), and TRUE.

Referenced by finish_writeconv(), io_binwrite(), io_fflush(), ossl_ssl_read_internal(), ossl_ssl_write_internal(), ossl_start_ssl(), rsock_bsock_send(), and udp_send().

int rb_wait_for_single_fd | ( | int | fd,
|  | int | events,
|  | struct timeval * | tv
| ) |  |

Definition at line 3687 of file thread.c.

References select_args::as, errno, select_args::error, select_args::except, select_args::fd, init_set_fd(), int, NULL, ptr, r, rb_ensure(), RB_WAITFD_IN, RB_WAITFD_OUT, RB_WAITFD_PRI, select_args::read, select_single(), select_single_cleanup(), select_args::tv, and select_args::write.

Referenced by io_wait_readable(), io_wait_writable(), rb_thread_wait_fd_rw(), and wait_connectable().