summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-06-01 16:25:12 +0900
committerNobuyoshi Nakada <[email protected]>2024-06-01 16:25:12 +0900
commitc05f60a600b2f61798124ea6f32a1c8f9d32731e (patch)
treea0e9d005773b3fd97485a0c3a4c3982bdade4531 /thread.c
parenta720a1c44702d91217b781e582269f1c57ecff1d (diff)
Suppress -Wclobbered warning for BLOCKING_REGION
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 153e172037..7034c21f29 100644
--- a/thread.c
+++ b/thread.c
@@ -1541,10 +1541,12 @@ rb_nogvl(void *(*func)(void *), void *data1,
}
}
+ rb_vm_t *volatile saved_vm = vm;
BLOCKING_REGION(th, {
val = func(data1);
saved_errno = rb_errno();
}, ubf, data2, flags & RB_NOGVL_INTR_FAIL);
+ vm = saved_vm;
if (is_main_thread) vm->ubf_async_safe = 0;