diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-04-30 11:08:39 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-04-30 11:08:39 +0000 |
commit | 4c926e9f15c42ef789e0af5ca2f15dc6188d1b3c (patch) | |
tree | d742fc1b7036e7ae0853cda21b081e4af5a0071d | |
parent | 5201602c276115ae4be8442d73c567c95af22f7b (diff) | |
download | ruby-4c926e9f15c42ef789e0af5ca2f15dc6188d1b3c.tar.gz |
* thread.c (do_select): remove useless ifdef. time calculation
is not heavy weight.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | thread.c | 7 |
2 files changed, 7 insertions, 5 deletions
@@ -1,3 +1,8 @@ +Sat Apr 30 20:06:36 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com> + + * thread.c (do_select): remove useless ifdef. time calculation + is not heavy weight. + Sat Apr 30 16:48:36 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com> * benchmark/bm_io_select3.rb: New. @@ -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; |