diff --git a/ChangeLog b/ChangeLog index 2168610e53..243eb6b6c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Apr 30 20:06:36 2011 KOSAKI Motohiro + + * thread.c (do_select): remove useless ifdef. time calculation + is not heavy weight. + Sat Apr 30 16:48:36 2011 KOSAKI Motohiro * benchmark/bm_io_select3.rb: New. diff --git a/thread.c b/thread.c index c70e24461b..ce84ed5566 100644 --- a/thread.c +++ b/thread.c @@ -2503,8 +2503,6 @@ do_select(int n, fd_set *read, fd_set *write, fd_set *except, fd_set UNINITIALIZED_VAR(orig_read); fd_set UNINITIALIZED_VAR(orig_write); fd_set UNINITIALIZED_VAR(orig_except); - -#ifndef linux double limit = 0; struct timeval wait_rest; # if defined(__CYGWIN__) || defined(_WIN32) @@ -2522,7 +2520,6 @@ do_select(int n, fd_set *read, fd_set *write, fd_set *except, wait_rest = *timeout; timeout = &wait_rest; } -#endif if (read) orig_read = *read; if (write) orig_write = *write; @@ -2583,7 +2580,7 @@ do_select(int n, fd_set *read, fd_set *write, fd_set *except, if (read) *read = orig_read; if (write) *write = orig_write; if (except) *except = orig_except; -#ifndef linux + if (timeout) { double d = limit - timeofday(); @@ -2592,7 +2589,7 @@ do_select(int n, fd_set *read, fd_set *write, fd_set *except, if (wait_rest.tv_sec < 0) wait_rest.tv_sec = 0; if (wait_rest.tv_usec < 0) wait_rest.tv_usec = 0; } -#endif + goto retry; default: break;