summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-01 04:56:51 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-01 04:56:51 +0000
commitd98da36b8c4534b87a0277716091f8df9f04f2d7 (patch)
tree5ba0887eb135e3600d8a505a98219830f78f37b2 /io.c
parent9be62b3b1aeb25114c6867f54c5d3a76d9f1db0b (diff)
* thread.c (rb_thread_fd_select): new function to call select
using rb_fdset_t. * io.c (select_internal): use rb_thread_fd_select instead of rb_thread_select. based on the patch from Kengo Matsuyama. [ruby-dev:38221] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/io.c b/io.c
index 38570eb065..ddfb5e0f43 100644
--- a/io.c
+++ b/io.c
@@ -6635,7 +6635,7 @@ static VALUE
select_internal(VALUE read, VALUE write, VALUE except, struct timeval *tp, rb_fdset_t *fds)
{
VALUE res, list;
- fd_set *rp, *wp, *ep;
+ rb_fdset_t *rp, *wp, *ep;
rb_io_t *fptr;
long i;
int max = 0, n;
@@ -6658,7 +6658,7 @@ select_internal(VALUE read, VALUE write, VALUE except, struct timeval *tp, rb_fd
timerec.tv_sec = timerec.tv_usec = 0;
tp = &timerec;
}
- rp = rb_fd_ptr(&fds[0]);
+ rp = &fds[0];
}
else
rp = 0;
@@ -6671,7 +6671,7 @@ select_internal(VALUE read, VALUE write, VALUE except, struct timeval *tp, rb_fd
rb_fd_set(fptr->fd, &fds[1]);
if (max < fptr->fd) max = fptr->fd;
}
- wp = rb_fd_ptr(&fds[1]);
+ wp = &fds[1];
}
else
wp = 0;
@@ -6690,7 +6690,7 @@ select_internal(VALUE read, VALUE write, VALUE except, struct timeval *tp, rb_fd
if (max < fptr->fd) max = fptr->fd;
}
}
- ep = rb_fd_ptr(&fds[2]);
+ ep = &fds[2];
}
else {
ep = 0;
@@ -6698,7 +6698,7 @@ select_internal(VALUE read, VALUE write, VALUE except, struct timeval *tp, rb_fd
max++;
- n = rb_thread_select(max, rp, wp, ep, tp);
+ n = rb_thread_fd_select(max, rp, wp, ep, tp);
if (n < 0) {
rb_sys_fail(0);
}