summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-28 14:27:49 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-28 14:27:49 +0000
commit8dd9c12c585375cc9d89441d7518a7846044deb0 (patch)
treefb3e3b2351ee24ff78d21116d18b9604c4a53fa0 /thread.c
parent75392e45f1f09f7f0e6036dcb1fb6513707d35e8 (diff)
move fields to ec.
* vm_core.h (rb_thread.h): move errinfo and trace_arg to rb_execution_context_t. * cont.c (fiber_switch, rb_cont_call): do not restore "trace_arg" here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/thread.c b/thread.c
index e7f6273199..b7ee1d8d9b 100644
--- a/thread.c
+++ b/thread.c
@@ -580,7 +580,7 @@ thread_do_start(rb_thread_t *th, VALUE args)
if (!th->first_func) {
rb_proc_t *proc;
GetProcPtr(th->first_proc, proc);
- th->errinfo = Qnil;
+ th->ec.errinfo = Qnil;
th->ec.root_lep = rb_vm_proc_local_ep(th->first_proc);
th->ec.root_svar = Qfalse;
EXEC_EVENT_HOOK(th, RUBY_EVENT_THREAD_BEGIN, th->self, 0, 0, 0, Qundef);
@@ -629,7 +629,7 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s
SAVE_ROOT_JMPBUF(th, thread_do_start(th, args));
}
else {
- errinfo = th->errinfo;
+ errinfo = th->ec.errinfo;
if (state == TAG_FATAL) {
/* fatal error within this thread, need to stop whole script */
}
@@ -923,8 +923,8 @@ thread_join(rb_thread_t *target_th, double delay)
thread_debug("thread_join: success (thid: %"PRI_THREAD_ID")\n",
thread_id_str(target_th));
- if (target_th->errinfo != Qnil) {
- VALUE err = target_th->errinfo;
+ if (target_th->ec.errinfo != Qnil) {
+ VALUE err = target_th->ec.errinfo;
if (FIXNUM_P(err)) {
switch (err) {
@@ -935,7 +935,7 @@ thread_join(rb_thread_t *target_th, double delay)
rb_bug("thread_join: Fixnum (%d) should not reach here.", FIX2INT(err));
}
}
- else if (THROW_DATA_P(target_th->errinfo)) {
+ else if (THROW_DATA_P(target_th->ec.errinfo)) {
rb_bug("thread_join: THROW_DATA should not reach here.");
}
else {
@@ -2008,7 +2008,7 @@ rb_threadptr_to_kill(rb_thread_t *th)
rb_threadptr_pending_interrupt_clear(th);
th->status = THREAD_RUNNABLE;
th->to_kill = 1;
- th->errinfo = INT2FIX(TAG_FATAL);
+ th->ec.errinfo = INT2FIX(TAG_FATAL);
TH_JUMP_TAG(th, TAG_FATAL);
}
@@ -2822,8 +2822,8 @@ rb_thread_status(VALUE thread)
rb_thread_t *target_th = rb_thread_ptr(thread);
if (rb_threadptr_dead(target_th)) {
- if (!NIL_P(target_th->errinfo) &&
- !FIXNUM_P(target_th->errinfo)) {
+ if (!NIL_P(target_th->ec.errinfo) &&
+ !FIXNUM_P(target_th->ec.errinfo)) {
return Qnil;
}
else {