ext/io/wait/wait.c File Reference

#include "ruby.h"
#include "ruby/io.h"
#include <sys/types.h>

Go to the source code of this file.

Defines

#define ioctl_arg   int
#define ioctl_arg2num(i)   INT2NUM(i)
#define FIONREAD_POSSIBLE_P(fd)   ((void)(fd),Qtrue)

Functions

static VALUE io_ready_p _ ((VALUE io))
static VALUE io_wait_readable _ ((int argc, VALUE *argv, VALUE io))
void Init_wait _ ((void))
static VALUE io_nread (VALUE io)
static VALUE io_ready_p (VALUE io)
static VALUE io_wait_readable (int argc, VALUE *argv, VALUE io)
static VALUE io_wait_writable (int argc, VALUE *argv, VALUE io)
void Init_wait ()


Define Documentation

#define FIONREAD_POSSIBLE_P ( fd   )     ((void)(fd),Qtrue)

Definition at line 39 of file wait.c.

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

#define ioctl_arg   int

Definition at line 32 of file wait.c.

#define ioctl_arg2num (  )     INT2NUM(i)

Definition at line 33 of file wait.c.

Referenced by io_nread().


Function Documentation

void Init_wait _ ( (void)   ) 

static VALUE io_wait_writable _ ( (int argc, VALUE *argv, VALUE io)   )  [static]

static VALUE io_ready_p _ ( (VALUE io)   )  [static]

void Init_wait (  ) 

Definition at line 180 of file wait.c.

References io_nread(), io_ready_p(), io_wait_readable(), io_wait_writable(), rb_cIO, and rb_define_method().

static VALUE io_nread ( VALUE  io  )  [static]

Definition at line 56 of file wait.c.

References rb_io_t::fd, FIONREAD_POSSIBLE_P, GetOpenFile, INT2FIX, ioctl(), ioctl_arg2num, len, rb_io_check_readable(), and rb_io_read_pending().

Referenced by Init_wait().

static VALUE io_ready_p ( VALUE  io  )  [static]

Definition at line 81 of file wait.c.

References rb_io_t::fd, FIONREAD_POSSIBLE_P, GetOpenFile, ioctl(), Qfalse, Qnil, Qtrue, rb_io_check_readable(), and rb_io_read_pending().

Referenced by Init_wait().

static VALUE io_wait_readable ( int  argc,
VALUE *  argv,
VALUE  io 
) [static]

Definition at line 107 of file wait.c.

References rb_io_t::fd, FIONREAD_POSSIBLE_P, GetOpenFile, ioctl(), NIL_P, NULL, Qfalse, Qnil, Qtrue, rb_io_check_closed(), rb_io_check_readable(), rb_io_read_pending(), rb_scan_args(), rb_sys_fail(), rb_time_interval(), rb_wait_for_single_fd(), RB_WAITFD_IN, and VALUE.

Referenced by Init_wait().

static VALUE io_wait_writable ( int  argc,
VALUE *  argv,
VALUE  io 
) [static]

Definition at line 147 of file wait.c.

References rb_io_t::fd, GetOpenFile, NIL_P, NULL, Qnil, rb_io_check_closed(), rb_io_check_writable(), rb_scan_args(), rb_sys_fail(), rb_time_interval(), rb_wait_for_single_fd(), RB_WAITFD_OUT, and VALUE.

Referenced by Init_wait().


Generated on 19 Jul 2016 for Ruby by  doxygen 1.4.7