summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-09-27 00:59:04 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-09-27 00:59:04 +0000
commit1bdf1a5c6f53fa834c10704bd9b60f6c0c375328 (patch)
tree1e8bce793ef80120aa2884025ccf37657bd50534 /thread.c
parent2cc5eeaf6c377a7b55e2bbaf6661929c17139aa6 (diff)
* thread_pthread.c: make native_fd_select().
* thread.c (do_select): remove #ifdef _WIN32. Instead, use native_fd_select() always. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/thread.c b/thread.c
index 3734cc2af2..4f9d09534d 100644
--- a/thread.c
+++ b/thread.c
@@ -2529,6 +2529,7 @@ do_select(int n, rb_fdset_t *read, rb_fdset_t *write, rb_fdset_t *except,
rb_fdset_t UNINITIALIZED_VAR(orig_except);
double limit = 0;
struct timeval wait_rest;
+ rb_thread_t *th = GET_THREAD();
if (timeout) {
limit = timeofday();
@@ -2547,21 +2548,10 @@ do_select(int n, rb_fdset_t *read, rb_fdset_t *write, rb_fdset_t *except,
retry:
lerrno = 0;
-#if defined(_WIN32)
- {
- rb_thread_t *th = GET_THREAD();
- BLOCKING_REGION({
+ BLOCKING_REGION({
result = native_fd_select(n, read, write, except, timeout, th);
if (result < 0) lerrno = errno;
}, ubf_select, th);
- }
-#else
- BLOCKING_REGION({
- result = rb_fd_select(n, read, write, except, timeout);
- if (result < 0) lerrno = errno;
- }, ubf_select, GET_THREAD());
-#endif
-
errno = lerrno;
if (result < 0) {