aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-04-30 11:15:15 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-04-30 11:15:15 +0000
commit2d2544c8e66ce6cc0973611145d442a165a9c663 (patch)
tree0dacf69ae87b70cb08438fcc53ed7b5b8959dee1 /ext
parent4c926e9f15c42ef789e0af5ca2f15dc6188d1b3c (diff)
downloadruby-2d2544c8e66ce6cc0973611145d442a165a9c663.tar.gz
* include/ruby/intern.h (rb_thread_select): mark as deprecated.
* ext/io/wait/wait.c (wait_readable): use rb_thread_fd_select instead of rb_thread_select. * ext/socket/init.c (wait_connectable0): ditto. * ext/readline/readline.c (readline_event): ditto. * io.c (rb_io_wait_readable, wait_readable, rb_io_wait_writable, wait_writable): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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;