diff options
author | Takashi Kokubun <[email protected]> | 2022-06-15 09:40:54 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2022-06-15 09:40:54 -0700 |
commit | 1162523bae926cfa6128043b635e28c14b732754 (patch) | |
tree | 5bdc6c91d8cb361f3b6ab3b8f6e7246e18b8a6f0 /thread.c | |
parent | 64fb3279d2063ea39280e9d9dc9154b6788c61e1 (diff) |
Remove MJIT worker thread (#6006)
[Misc #18830]
Notes
Notes:
Merged-By: k0kubun <[email protected]>
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -2233,6 +2233,12 @@ threadptr_get_interrupts(rb_thread_t *th) return interrupt & (rb_atomic_t)~ec->interrupt_mask; } +#if USE_MJIT +// process.c +extern bool mjit_waitpid_finished; +extern int mjit_waitpid_status; +#endif + MJIT_FUNC_EXPORTED int rb_threadptr_execute_interrupts(rb_thread_t *th, int blocking_timing) { @@ -2280,6 +2286,15 @@ rb_threadptr_execute_interrupts(rb_thread_t *th, int blocking_timing) ret |= rb_signal_exec(th, sig); } th->status = prev_status; + +#if USE_MJIT + // Handle waitpid_signal for MJIT issued by ruby_sigchld_handler. This needs to be done + // outside ruby_sigchld_handler to avoid recursively relying on the SIGCHLD handler. + if (mjit_waitpid_finished) { + mjit_waitpid_finished = false; + mjit_notify_waitpid(mjit_waitpid_status); + } +#endif } /* exception from another thread */ |