mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Suppress -Wclobbered warning for BLOCKING_REGION
This commit is contained in:
parent
a720a1c447
commit
c05f60a600
1 changed files with 2 additions and 0 deletions
2
thread.c
2
thread.c
|
@ -1541,10 +1541,12 @@ rb_nogvl(void *(*func)(void *), void *data1,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rb_vm_t *volatile saved_vm = vm;
|
||||||
BLOCKING_REGION(th, {
|
BLOCKING_REGION(th, {
|
||||||
val = func(data1);
|
val = func(data1);
|
||||||
saved_errno = rb_errno();
|
saved_errno = rb_errno();
|
||||||
}, ubf, data2, flags & RB_NOGVL_INTR_FAIL);
|
}, ubf, data2, flags & RB_NOGVL_INTR_FAIL);
|
||||||
|
vm = saved_vm;
|
||||||
|
|
||||||
if (is_main_thread) vm->ubf_async_safe = 0;
|
if (is_main_thread) vm->ubf_async_safe = 0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue