diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-05-23 20:14:20 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-05-25 15:22:43 +0900 |
| commit | aad9fa285398d48b5647f8a36922b8d817a24156 (patch) | |
| tree | b789aa228c8cfe1f3e006cc9156970587aa19514 /thread_pthread.c | |
| parent | fc518fe1ff0410f836b01577b8c4f3940404a24b (diff) | |
Use RB_VM_LOCKING
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/13439
Diffstat (limited to 'thread_pthread.c')
| -rw-r--r-- | thread_pthread.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index c00254d29f..1ec460940a 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -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 } |
