summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-07 06:09:47 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-07 06:09:47 +0000
commitf6c102e6a58cfd5f6ab2144e13727a074aef0b46 (patch)
tree169da4976d6c62710b62bce652b7410eadf7d10b /thread.c
parent2d71889b6b48f55780e2d97e4a159469427c94da (diff)
th->ec: rb_threadptr_setup_exception
* eval.c (rb_threadptr_setup_exception): renamed to rb_ec_setup_exception(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/thread.c b/thread.c
index 642d48f81c..3cbb97dd37 100644
--- a/thread.c
+++ b/thread.c
@@ -2112,14 +2112,12 @@ rb_threadptr_ready(rb_thread_t *th)
rb_threadptr_interrupt(th);
}
-void rb_threadptr_setup_exception(rb_thread_t *th, VALUE mesg, VALUE cause);
-
static VALUE
-rb_threadptr_raise(rb_thread_t *th, int argc, VALUE *argv)
+rb_threadptr_raise(rb_thread_t *target_th, int argc, VALUE *argv)
{
VALUE exc;
- if (rb_threadptr_dead(th)) {
+ if (rb_threadptr_dead(target_th)) {
return Qnil;
}
@@ -2132,13 +2130,13 @@ rb_threadptr_raise(rb_thread_t *th, int argc, VALUE *argv)
/* making an exception object can switch thread,
so we need to check thread deadness again */
- if (rb_threadptr_dead(th)) {
+ if (rb_threadptr_dead(target_th)) {
return Qnil;
}
- rb_threadptr_setup_exception(GET_THREAD(), exc, Qundef);
- rb_threadptr_pending_interrupt_enque(th, exc);
- rb_threadptr_interrupt(th);
+ rb_ec_setup_exception(GET_EC(), exc, Qundef);
+ rb_threadptr_pending_interrupt_enque(target_th, exc);
+ rb_threadptr_interrupt(target_th);
return Qnil;
}