aboutsummaryrefslogtreecommitdiffstats
path: root/thread_pthread.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-15 04:32:36 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-15 04:32:36 +0000
commit4b54a51d6acd4a1ada7f2e4117f1eabd02771cdc (patch)
treed06c7d5f87bc95b6deae52b5bf5d217fc48dda82 /thread_pthread.c
parent6403d621f550ff0056fc0dd57b41a4f65c36a84e (diff)
downloadruby-4b54a51d6acd4a1ada7f2e4117f1eabd02771cdc.tar.gz
thread_pthread.c: additional UBF_TIMER == UBF_TIMER_PTHREAD guards
Hopefully this makes the code easier-to-follow [ruby-core:88475] [Misc #14937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 75ce110063..d48c57ce37 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -1596,7 +1596,8 @@ rb_timer_create(rb_pid_t current)
else
rb_warn("timer_create failed: %s, signals racy", strerror(errno));
#endif
- rb_timer_pthread_create(current);
+ if (UBF_TIMER == UBF_TIMER_PTHREAD)
+ ubf_timer_pthread_create(current);
}
static void
@@ -1620,7 +1621,7 @@ rb_thread_create_timer_thread(void)
sigwait_th = THREAD_INVALID;
timer_thread_pipe.owner_process = current;
}
- else {
+ else if (UBF_TIMER == UBF_TIMER_PTHREAD) {
/* UBF_TIMER_PTHREAD needs to recreate after fork */
rb_timer_pthread_create(current);
}