summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-02-19 16:27:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-02-19 16:27:47 +0000
commitafca4f0cfd0bcc769451d5160320c7a33b3c4ed1 (patch)
tree1f39819ebd0b882467d0cafac2ae02da439ff453 /eval.c
parent0b78e04234ee5cd79c9d7a11c215450816ee805f (diff)
* eval.c (rb_thread_restore_context): inhibit interrupts in
critical section while context switching. [ruby-talk:64785] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 410248a9a0..6cb8224479 100644
--- a/eval.c
+++ b/eval.c
@@ -7825,6 +7825,7 @@ static int
thread_switch(n)
int n;
{
+ rb_trap_immediate = (curr_thread->flags&0x100)?1:0;
switch (n) {
case 0:
return 0;
@@ -7890,6 +7891,7 @@ rb_thread_restore_context(th, exit)
if (&v < th->stk_pos + th->stk_len) stack_extend(th, exit);
}
+ rb_trap_immediate = 0; /* inhibit interrupts from here */
ruby_frame = th->frame;
ruby_scope = th->scope;
ruby_class = th->klass;
@@ -7898,7 +7900,6 @@ rb_thread_restore_context(th, exit)
ruby_dyna_vars = th->dyna_vars;
ruby_block = th->block;
scope_vmode = th->flags&SCOPE_MASK;
- rb_trap_immediate = (th->flags&0x100)?1:0;
ruby_iter = th->iter;
prot_tag = th->tag;
tracing = th->tracing;