diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-10 03:59:19 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-10 03:59:19 +0000 |
commit | 3887a34c9040ae6f29eea592073d4dcc283cea4e (patch) | |
tree | f72fb87eedb9c34ea09068580867860f2beb58a4 /thread_pthread.c | |
parent | 5cebbe8f9b61edac849d8131e32d4d20105d1164 (diff) | |
download | ruby-3887a34c9040ae6f29eea592073d4dcc283cea4e.tar.gz |
* thread_pthread.c (USE_SLEEPY_TIMER_THREAD): use more accurate
ifdef condtions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r-- | thread_pthread.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index c67718a362..1faf2755a7 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -53,12 +53,12 @@ static pthread_t timer_thread_id; #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 |