Skip to content

Commit

Permalink
* eval.c (rb_thread_select): cleanup conditional compilation.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed May 16, 2002
1 parent 849fb05 commit 3b89da6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Thu May 16 14:46:34 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>

* eval.c (rb_thread_select): cleanup conditional compilation.

Tue May 14 18:17:44 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>

* win32/Makefile.sub: config.h inlined. and catch up with the
Expand Down
23 changes: 5 additions & 18 deletions eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -8058,6 +8058,9 @@ rb_thread_select(max, read, write, except, timeout)
tv = *timeout;
tvp = &tv;
}
#else
struct timeval *const tvp = timeout;
#endif
for (;;) {
TRAP_BEG;
n = select(max, read, write, except, tvp);
Expand All @@ -8068,6 +8071,7 @@ rb_thread_select(max, read, write, except, timeout)
#ifdef ERESTART
case ERESTART:
#endif
#ifndef linux
if (timeout) {
double d = limit - timeofday();

Expand All @@ -8076,31 +8080,14 @@ rb_thread_select(max, read, write, except, timeout)
if (tv.tv_sec < 0) tv.tv_sec = 0;
if (tv.tv_usec < 0) tv.tv_usec = 0;
}
#endif
continue;
default:
break;
}
}
return n;
}
#else
for (;;) {
TRAP_BEG;
n = select(max, read, write, except, timeout);
TRAP_END;
if (n < 0) {
switch (errno) {
case EINTR:
#ifdef ERESTART
case ERESTART:
#endif
continue;
}
}
return n;
}
#endif

}

curr_thread->status = THREAD_STOPPED;
Expand Down

0 comments on commit 3b89da6

Please sign in to comment.