summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-22 09:37:13 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-22 09:37:13 +0000
commit687dfb2ac2c9768b2cb05ad8a0653aebb31eb23a (patch)
tree80188ebdcc7f50118a2c882d19d01d19c420417c /eval.c
parente3f091fa076685003543d11f3ed761f829bce3d5 (diff)
downloadruby-687dfb2ac2c9768b2cb05ad8a0653aebb31eb23a.tar.gz
ruby-687dfb2ac2c9768b2cb05ad8a0653aebb31eb23a.tar.xz
ruby-687dfb2ac2c9768b2cb05ad8a0653aebb31eb23a.zip
* eval.c (rb_with_disable_interrupt): use ENABLE_INTS instead of
ALLOW_INTS which may switch context. [ruby-dev:22319] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/eval.c b/eval.c
index 545d678be..8d19602c4 100644
--- a/eval.c
+++ b/eval.c
@@ -4733,14 +4733,18 @@ rb_with_disable_interrupt(proc, data)
int status;
DEFER_INTS;
- RUBY_CRITICAL(
+ {
+ int thr_critical = rb_thread_critical;
+
+ rb_thread_critical = Qtrue;
PUSH_TAG(PROT_NONE);
if ((status = EXEC_TAG()) == 0) {
result = (*proc)(data);
}
POP_TAG();
- );
- ALLOW_INTS;
+ rb_thread_critical = thr_critical;
+ }
+ ENABLE_INTS;
if (status) JUMP_TAG(status);
return result;