Lines Matching refs:th

159     rb_thread_t *th = GET_THREAD();
162 rb_threadptr_interrupt(th);
163 rb_threadptr_check_signal(th);
166 SAVE_ROOT_JMPBUF(th, { RUBY_VM_CHECK_INTS(th); });
170 errs[1] = th->errinfo;
171 th->safe_level = 0;
176 SAVE_ROOT_JMPBUF(th, ruby_finalize_0());
181 th->status = THREAD_KILLED;
183 errs[0] = th->errinfo;
186 SAVE_ROOT_JMPBUF(th, rb_thread_terminate_all());
191 th->errinfo = errs[1];
217 /* th->errinfo contains a NODE while break'ing */
244 rb_thread_t *th = GET_THREAD();
250 SAVE_ROOT_JMPBUF(th, {
251 th->base_block = 0;
428 setup_exception(rb_thread_t *th, int tag, volatile VALUE mesg)
436 mesg = th->errinfo;
463 th->errinfo = mesg;
466 if (RTEST(ruby_debug) && !NIL_P(e = th->errinfo) &&
473 th->errinfo = Qnil;
475 th->errinfo = mesg;
490 if (status == TAG_FATAL && th->errinfo == exception_error) {
491 th->errinfo = mesg;
494 rb_threadptr_reset_raised(th);
499 if (rb_threadptr_set_raised(th)) {
500 th->errinfo = exception_error;
501 rb_threadptr_reset_raised(th);
507 RUBY_DTRACE_RAISE(rb_obj_classname(th->errinfo),
511 EXEC_EVENT_HOOK(th, RUBY_EVENT_RAISE, th->cfp->self, 0, 0, mesg);
518 rb_thread_t *th = GET_THREAD();
519 setup_exception(th, tag, mesg);
520 rb_thread_raised_clear(th);
650 rb_thread_t *th = GET_THREAD();
651 rb_control_frame_t *cfp = th->cfp;
656 th->cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(th->cfp);
658 setup_exception(th, TAG_RAISE, mesg);
660 EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, self, mid, klass, Qnil);
661 rb_thread_raised_clear(th);
674 rb_thread_t *th = GET_THREAD();
676 if (rb_vm_control_frame_block_ptr(th->cfp)) {
705 rb_thread_t *th = GET_THREAD();
706 rb_control_frame_t *cfp = th->cfp;
708 volatile VALUE e_info = th->errinfo;
711 TH_PUSH_TAG(th);
717 th->cfp = cfp; /* restore */
725 if (rb_obj_is_kind_of(th->errinfo, eclass)) {
736 result = (*r_proc) (data2, th->errinfo);
741 th->errinfo = Qnil;
750 th->errinfo = e_info;
775 rb_thread_t *th = GET_THREAD();
776 rb_control_frame_t *cfp = th->cfp;
780 protect_tag.prev = th->protect_tag;
782 TH_PUSH_TAG(th);
783 th->protect_tag = &protect_tag;
784 MEMCPY(&org_jmpbuf, &(th)->root_jmpbuf, rb_jmpbuf_t, 1);
786 SAVE_ROOT_JMPBUF(th, result = (*proc) (data));
788 MEMCPY(&(th)->root_jmpbuf, &org_jmpbuf, rb_jmpbuf_t, 1);
789 th->protect_tag = protect_tag.prev;
796 th->cfp = cfp;
809 rb_thread_t *const th = GET_THREAD();
818 errinfo = th->errinfo;
820 th->errinfo = errinfo;
829 rb_thread_t *th = GET_THREAD();
832 cfp_limit = (rb_control_frame_t *)(th->stack + th->stack_size);
908 previous_frame(rb_thread_t *th)
910 rb_control_frame_t *prev_cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(th->cfp);
912 if ((void *)(th->stack + th->stack_size) == (void *)(prev_cfp)) {
937 rb_thread_t *th = GET_THREAD();
938 th->cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(th->cfp);
1185 rb_thread_t *th = GET_THREAD();
1186 rb_block_t *block = rb_vm_control_frame_block_ptr(th->cfp);
1329 rb_thread_t *th = GET_THREAD();
1332 if (th->top_wrapper) {
1334 return rb_mod_include(argc, argv, th->top_wrapper);
1364 errinfo_place(rb_thread_t *th)
1366 rb_control_frame_t *cfp = th->cfp;
1367 rb_control_frame_t *end_cfp = RUBY_VM_END_CONTROL_FRAME(th);
1386 get_thread_errinfo(rb_thread_t *th)
1388 VALUE *ptr = errinfo_place(th);
1393 return th->errinfo;
1431 rb_thread_t *th = GET_THREAD();
1432 return th->errinfo;