summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
authorJohn Hawthorn <[email protected]>2023-11-29 15:54:32 -0800
committerJohn Hawthorn <[email protected]>2023-12-02 10:06:07 -0800
commitad54fbf281ca1935e79f4df1460b0106ba76761e ()
treeae560415a2804342a0e7ef13f7cf6e245752960c /thread_pthread.c
parent715cf9b6902b0cc317fbc5cea0df153e14ff7277 (diff)
Add missing GVL hooks for M:N threads and ractors
[Bug #20019] This fixes GVL instrumentation in three locations it was missing: - Suspending when blocking on a Ractor - Suspending when doing a coroutine transfer from an M:N thread - Resuming after an M:N thread starts Co-authored-by: Matthew Draper <[email protected]>
-rw-r--r--thread_pthread.c2
1 files changed, 2 insertions, 0 deletions
@@ -1304,6 +1304,8 @@ rb_ractor_sched_sleep(rb_execution_context_t *ec, rb_ractor_t *cr, rb_unblock_fu
RB_VM_SAVE_MACHINE_CONTEXT(th);
th->status = THREAD_STOPPED_FOREVER;
bool can_direct_transfer = !th_has_dedicated_nt(th);
thread_sched_wakeup_next_thread(sched, th, can_direct_transfer);
thread_sched_wait_running_turn(sched, th, can_direct_transfer);