aboutsummaryrefslogtreecommitdiffstats
path: root/thread_pthread.c
diff options
context:
space:
mode:
authorodaira <odaira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-25 16:07:25 +0000
committerodaira <odaira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-25 16:07:25 +0000
commitd21bafbe0f0e03449612084fd894d1783e654a3d (patch)
tree9ef3e2f6799f2e70add247a6dd77f3db9a87ac1e /thread_pthread.c
parentee04889799c4a94ddfb483ce931116281ff9dd1f (diff)
downloadruby-d21bafbe0f0e03449612084fd894d1783e654a3d.tar.gz
* thread_pthread.c: fix compile erros when
USE_SLEEPY_TIMER_THREAD is disabled. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 9c571c913d..b361e8bc0a 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -1012,6 +1012,7 @@ native_thread_create(rb_thread_t *th)
return err;
}
+#if USE_SLEEPY_TIMER_THREAD
static void
native_thread_join(pthread_t th)
{
@@ -1020,6 +1021,7 @@ native_thread_join(pthread_t th)
rb_raise(rb_eThreadError, "native_thread_join() failed (%d)", err);
}
}
+#endif
#if USE_NATIVE_THREAD_PRIORITY
@@ -1644,10 +1646,12 @@ rb_thread_create_timer_thread(void)
if (err != 0) {
rb_warn("pthread_create failed for timer: %s, scheduling broken",
strerror(err));
+#if USE_SLEEPY_TIMER_THREAD
CLOSE_INVALIDATE(normal[0]);
CLOSE_INVALIDATE(normal[1]);
CLOSE_INVALIDATE(low[0]);
CLOSE_INVALIDATE(low[1]);
+#endif
return;
}
timer_thread.created = 1;
@@ -1664,6 +1668,7 @@ native_stop_timer_thread(void)
stopped = --system_working <= 0;
if (TT_DEBUG) fprintf(stderr, "stop timer thread\n");
+#if USE_SLEEPY_TIMER_THREAD
if (stopped) {
/* prevent wakeups from signal handler ASAP */
timer_thread_pipe.owner_process = 0;
@@ -1691,6 +1696,7 @@ native_stop_timer_thread(void)
if (TT_DEBUG) fprintf(stderr, "joined timer thread\n");
timer_thread.created = 0;
}
+#endif
return stopped;
}