summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-27 17:17:13 (GMT)
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-27 17:17:13 (GMT)
commit9d4027b50334ef804f6f138fba1d342fe188826b (patch)
tree188881021cb48ac4e073520a5bf3e2facf029742 /thread_pthread.c
parent943bf37b10599d585f368c1f8d2e738b6ed8e98c (diff)
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 ef3cecb..fa79b03 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)
{