Use RB_VM_LOCKING

This commit is contained in:
Nobuyoshi Nakada 2025-05-23 20:14:20 +09:00
parent fc518fe1ff
commit aad9fa2853
No known key found for this signature in database
GPG key ID: 3582D74E1FEE4465
Notes: git 2025-05-26 02:44:06 +00:00
18 changed files with 206 additions and 328 deletions

View file

@ -630,8 +630,7 @@ thread_sched_setup_running_threads(struct rb_thread_sched *sched, rb_ractor_t *c
#endif
thread_sched_unlock(sched, lock_owner);
{
RB_VM_LOCK_ENTER();
RB_VM_LOCK_LEAVE();
RB_VM_LOCKING();
}
thread_sched_lock(sched, lock_owner);
}
@ -2283,11 +2282,9 @@ rb_threadptr_remove(rb_thread_t *th)
rb_vm_t *vm = th->vm;
th->sched.finished = false;
RB_VM_LOCK_ENTER();
{
RB_VM_LOCKING() {
ccan_list_add(&vm->ractor.sched.zombie_threads, &th->sched.node.zombie_threads);
}
RB_VM_LOCK_LEAVE();
}
#endif
}