ruby-changes:19353
From: kosaki <ko1@a...>
Date: Sat, 30 Apr 2011 20:08:45 +0900 (JST)
Subject: [ruby-changes:19353] Ruby:r31393 (trunk): * thread.c (do_select): remove useless ifdef. time calculation
kosaki 2011-04-30 20:08:39 +0900 (Sat, 30 Apr 2011) New Revision: 31393 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31393 Log: * thread.c (do_select): remove useless ifdef. time calculation is not heavy weight. Modified files: trunk/ChangeLog trunk/thread.c Index: ChangeLog =================================================================== --- ChangeLog (revision 31392) +++ ChangeLog (revision 31393) @@ -1,3 +1,8 @@ +Sat Apr 30 20:06:36 2011 KOSAKI Motohiro <kosaki.motohiro@g...> + + * thread.c (do_select): remove useless ifdef. time calculation + is not heavy weight. + Sat Apr 30 16:48:36 2011 KOSAKI Motohiro <kosaki.motohiro@g...> * benchmark/bm_io_select3.rb: New. Index: thread.c =================================================================== --- thread.c (revision 31392) +++ thread.c (revision 31393) @@ -2503,8 +2503,6 @@ 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 @@ wait_rest = *timeout; timeout = &wait_rest; } -#endif if (read) orig_read = *read; if (write) orig_write = *write; @@ -2583,7 +2580,7 @@ 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 @@ 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/