summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2025-05-23 20:14:20 +0900
committerNobuyoshi Nakada <[email protected]>2025-05-25 15:22:43 +0900
commitaad9fa285398d48b5647f8a36922b8d817a24156 (patch)
treeb789aa228c8cfe1f3e006cc9156970587aa19514 /process.c
parentfc518fe1ff0410f836b01577b8c4f3940404a24b (diff)
Use RB_VM_LOCKING
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13439
Diffstat (limited to 'process.c')
-rw-r--r--process.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/process.c b/process.c
index 605821853e..f8d738a98c 100644
--- a/process.c
+++ b/process.c
@@ -4132,12 +4132,10 @@ rb_fork_ruby(int *status)
rb_thread_acquire_fork_lock();
disable_child_handler_before_fork(&old);
- RB_VM_LOCK_ENTER();
- {
+ RB_VM_LOCKING() {
child.pid = pid = rb_fork();
child.error = err = errno;
}
- RB_VM_LOCK_LEAVE();
disable_child_handler_fork_parent(&old); /* yes, bad name */
if (
@@ -8756,9 +8754,9 @@ static VALUE rb_mProcID_Syscall;
static VALUE
proc_warmup(VALUE _)
{
- RB_VM_LOCK_ENTER();
- rb_gc_prepare_heap();
- RB_VM_LOCK_LEAVE();
+ RB_VM_LOCKING() {
+ rb_gc_prepare_heap();
+ }
return Qtrue;
}