summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
authorKoichi Sasada <ko1@atdot.net>2024-07-09 06:00:04 +0900
committerKoichi Sasada <ko1@atdot.net>2024-07-09 06:43:28 +0900
commite500222de1a8d5e7a844209a7e912b03db8cdf76 (patch)
tree0f86e29530e5d164827da41c0bd570ea3e8329cc /thread_pthread.c
parentffc69eec0a5746d48ef3cf649639c67631a6a609 (diff)
fix last commit
`th` is gone.
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 20714b18b0..a4363aec48 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -1321,7 +1321,7 @@ rb_ractor_sched_sleep(rb_execution_context_t *ec, rb_ractor_t *cr, rb_unblock_fu
{
// ractor lock of cr is acquired
// r is sleeping statuss
- rb_thread_t *th = rb_ec_thread_ptr(ec);
+ rb_thread_t * volatile th = rb_ec_thread_ptr(ec);
struct rb_thread_sched *sched = TH_SCHED(th);
cr->sync.wait.waiting_thread = th; // TODO: multi-thread
@@ -2974,7 +2974,7 @@ timer_thread_deq_wakeup(rb_vm_t *vm, rb_hrtime_t now)
(w->flags & thread_sched_waiting_timeout) &&
timer_thread_check_exceed(w->data.timeout, now)) {
- RUBY_DEBUG_LOG("wakeup th:%u", rb_th_serial(th));
+ RUBY_DEBUG_LOG("wakeup th:%u", rb_th_serial(thread_sched_waiting_thread(w)));
// delete from waiting list
ccan_list_del_init(&w->node);
close