summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-26 11:45:39 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-26 11:45:39 +0000
commit58543f00b6386b5631ffc6d8f029be149d632457 (patch)
treeb87816cbf20e9607e7436ac0a62d85c6c244b04c /thread.c
parent12d48f4ef242eaa48844e9dbbbd5ae22b87870c3 (diff)
* thread.c (thread_join_m): use th->interrupt_mask instead of
th->in_trap. * vm_core.h (struct rb_thread_struct): remove in_trap member. * signal.c (signal_exec): ditto. * thread.c (thread_create_core): ditto. * thread.c (Init_Thread): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/thread.c b/thread.c
index c11f57b13b..3264548480 100644
--- a/thread.c
+++ b/thread.c
@@ -581,7 +581,6 @@ thread_create_core(VALUE thval, VALUE args, VALUE (*fn)(ANYARGS))
th->async_errinfo_mask_stack = rb_ary_dup(current_th->async_errinfo_mask_stack);
RBASIC(th->async_errinfo_mask_stack)->klass = 0;
- th->in_trap = 0;
th->interrupt_mask = 0;
native_mutex_initialize(&th->interrupt_lock);
@@ -811,7 +810,7 @@ thread_join_m(int argc, VALUE *argv, VALUE self)
double delay = DELAY_INFTY;
VALUE limit;
- if (cur_th->in_trap) {
+ if (cur_th->interrupt_mask & 0x08) {
rb_raise(rb_eThreadError, "can't be called from trap context");
}
@@ -4813,7 +4812,6 @@ Init_Thread(void)
th->async_errinfo_queue_checked = 0;
th->async_errinfo_mask_stack = rb_ary_tmp_new(0);
- th->in_trap = 0;
th->interrupt_mask = 0;
}
}