summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/io/wait/wait.c4
-rw-r--r--ext/readline/readline.c8
-rw-r--r--ext/socket/init.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/ext/io/wait/wait.c b/ext/io/wait/wait.c
index 13b522bdf5..93de56000b 100644
--- a/ext/io/wait/wait.c
+++ b/ext/io/wait/wait.c
@@ -100,7 +100,7 @@ wait_readable(VALUE p)
struct wait_readable_arg *arg = (struct wait_readable_arg *)p;
rb_fdset_t *fds = &arg->fds;
- return (VALUE)rb_thread_select(rb_fd_max(fds), rb_fd_ptr(fds), NULL, NULL, arg->timeout);
+ return (VALUE)rb_thread_fd_select(rb_fd_max(fds), fds, NULL, NULL, arg->timeout);
}
#endif
@@ -143,7 +143,7 @@ io_wait(int argc, VALUE *argv, VALUE io)
i = (int)rb_ensure(wait_readable, (VALUE)&arg,
(VALUE (*)_((VALUE)))rb_fd_term, (VALUE)&arg.fds);
#else
- i = rb_thread_select(fd + 1, rb_fd_ptr(&arg.fds), NULL, NULL, arg.timeout);
+ i = rb_thread_fd_select(fd + 1, &arg.fds, NULL, NULL, arg.timeout);
#endif
if (i < 0)
rb_sys_fail(0);
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index a313271b3a..cb17d9ca9e 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -145,11 +145,11 @@ readline_event(void)
#if BUSY_WAIT
rb_thread_schedule();
#else
- fd_set rset;
+ rb_fdset_t fds;
- FD_ZERO(&rset);
- FD_SET(fileno(rl_instream), &rset);
- rb_thread_select(fileno(rl_instream) + 1, &rset, NULL, NULL, NULL);
+ rb_fd_init(fds);
+ rb_fd_set(fileno(rl_instream), &fds);
+ rb_thread_fd_select(fileno(rl_instream) + 1, &fds, NULL, NULL, NULL);
return 0;
#endif
}
diff --git a/ext/socket/init.c b/ext/socket/init.c
index 8fa907f1dc..137027a531 100644
--- a/ext/socket/init.c
+++ b/ext/socket/init.c
@@ -266,7 +266,7 @@ wait_connectable0(int fd, rb_fdset_t *fds_w, rb_fdset_t *fds_e)
rb_fd_set(fd, fds_w);
rb_fd_set(fd, fds_e);
- rb_thread_select(fd+1, 0, rb_fd_ptr(fds_w), rb_fd_ptr(fds_e), 0);
+ rb_thread_fd_select(fd+1, 0, fds_w, fds_e, 0);
if (rb_fd_isset(fd, fds_w)) {
return 0;