From 9d4027b50334ef804f6f138fba1d342fe188826b Mon Sep 17 00:00:00 2001 From: normal Date: Mon, 27 Aug 2018 17:17:13 +0000 Subject: 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 --- thread_pthread.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'thread_pthread.c') 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) { -- cgit v1.2.3