[前][次][番号順一覧][スレッド一覧]

ruby-changes:27628

From: kosaki <ko1@a...>
Date: Sun, 10 Mar 2013 12:59:27 +0900 (JST)
Subject: [ruby-changes:27628] kosaki:r39680 (trunk): * thread_pthread.c (USE_SLEEPY_TIMER_THREAD): use more accurate

kosaki	2013-03-10 12:59:19 +0900 (Sun, 10 Mar 2013)

  New Revision: 39680

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39680

  Log:
    * thread_pthread.c (USE_SLEEPY_TIMER_THREAD): use more accurate
      ifdef condtions.

  Modified files:
    trunk/ChangeLog
    trunk/thread_pthread.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39679)
+++ ChangeLog	(revision 39680)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Mar  6 21:00:23 2013  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* thread_pthread.c (USE_SLEEPY_TIMER_THREAD): use more accurate
+	  ifdef condtions.
+
 Sun Mar  3 02:30:36 2013  KOSAKI Motohiro  <kosaki.motohiro@g...>
 
 	* thread_pthread.c (set_nonblock): new helper function for set
Index: thread_pthread.c
===================================================================
--- thread_pthread.c	(revision 39679)
+++ thread_pthread.c	(revision 39680)
@@ -53,12 +53,12 @@ static pthread_t timer_thread_id; https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L53
 #define USE_MONOTONIC_COND 0
 #endif
 
-#ifdef __native_client__
-/* Doesn't have select(1). */
-# define USE_SLEEPY_TIMER_THREAD 0
-#else
+#if defined(HAVE_FCNTL) && defined(F_GETFL) && defined(F_SETFL) && defined(O_NONBLOCK) && !defined(__native_client__)
 /* The timer thread sleeps while only one Ruby thread is running. */
 # define USE_SLEEPY_TIMER_THREAD 1
+#else
+/* Doesn't have select(1). */
+# define USE_SLEEPY_TIMER_THREAD 0
 #endif
 
 static void

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]