aboutsummaryrefslogtreecommitdiffstats
path: root/thread_pthread.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-27 17:17:13 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-27 17:17:13 +0000
commit94cb7bfb74eff995c94229d4ba90fcf3fb378418 (patch)
tree188881021cb48ac4e073520a5bf3e2facf029742 /thread_pthread.c
parentb70c9d37fb68aa8c80213993566617f89edd32b6 (diff)
downloadruby-94cb7bfb74eff995c94229d4ba90fcf3fb378418.tar.gz
process.c: simplify SIGCHLD-based waitpid
Introduce a new rb_thread_sleep_interruptible that does not execute interrupts before sleeping. Skipping the interrupt check before sleep is required for out-of-GVL ruby_waitpid_all to function properly when setting waitpid_state.ret Now that ubf_select can be called by the gvl.timer thread without recursive locking gvl.lock, we can safely use rb_threadptr_interrupt to deal with waking up sleeping processes, git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index ef3cecb0e2..fa79b03c55 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -1873,26 +1873,6 @@ rb_thread_create_mjit_thread(void (*worker_func)(void))
return ret;
}
-#ifndef USE_NATIVE_SLEEP_COND
-#define USE_NATIVE_SLEEP_COND (1)
-#endif
-
-#if USE_NATIVE_SLEEP_COND
-rb_nativethread_cond_t *
-rb_sleep_cond_get(const rb_execution_context_t *ec)
-{
- rb_thread_t *th = rb_ec_thread_ptr(ec);
-
- return &th->native_thread_data.cond.intr;
-}
-
-void
-rb_sleep_cond_put(rb_nativethread_cond_t *cond)
-{
- /* no-op */
-}
-#endif /* USE_NATIVE_SLEEP_COND */
-
int
rb_sigwait_fd_get(const rb_thread_t *th)
{