aboutsummaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2023-03-31 17:57:25 +0900
committerKoichi Sasada <ko1@atdot.net>2023-03-31 18:50:10 +0900
commitf803bcfc872b31faeb1b894e315175e410024cd5 (patch)
treec20ae62c10b317b0c69429720912078fa17b17e1 /thread.c
parent4c0f82eb5b13e436a93497eaf23d965efa35a39e (diff)
downloadruby-f803bcfc872b31faeb1b894e315175e410024cd5.tar.gz
pass `th` to `thread_sched_to_waiting()`
for future extension
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/thread.c b/thread.c
index f5a6f9e34b..7dd08b366a 100644
--- a/thread.c
+++ b/thread.c
@@ -174,10 +174,10 @@ static inline void blocking_region_end(rb_thread_t *th, struct rb_blocking_regio
#define THREAD_BLOCKING_BEGIN(th) do { \
struct rb_thread_sched * const sched = TH_SCHED(th); \
RB_VM_SAVE_MACHINE_CONTEXT(th); \
- thread_sched_to_waiting(sched);
+ thread_sched_to_waiting((sched), (th));
#define THREAD_BLOCKING_END(th) \
- thread_sched_to_running(sched, th); \
+ thread_sched_to_running((sched), (th)); \
rb_ractor_thread_switch(th->ractor, th); \
} while(0)
@@ -778,12 +778,12 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start)
// after rb_ractor_living_threads_remove()
// GC will happen anytime and this ractor can be collected (and destroy GVL).
// So gvl_release() should be before it.
- thread_sched_to_dead(TH_SCHED(th));
+ thread_sched_to_dead(TH_SCHED(th), th);
rb_ractor_living_threads_remove(th->ractor, th);
}
else {
rb_ractor_living_threads_remove(th->ractor, th);
- thread_sched_to_dead(TH_SCHED(th));
+ thread_sched_to_dead(TH_SCHED(th), th);
}
return 0;
@@ -1480,7 +1480,7 @@ blocking_region_begin(rb_thread_t *th, struct rb_blocking_region_buffer *region,
RUBY_DEBUG_LOG("");
RB_VM_SAVE_MACHINE_CONTEXT(th);
- thread_sched_to_waiting(TH_SCHED(th));
+ thread_sched_to_waiting(TH_SCHED(th), th);
return TRUE;
}
else {