summaryrefslogtreecommitdiff
path: root/cont.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-29 12:57:04 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-29 12:57:04 (GMT)
commit382aa678d093904762f352063689577b3269a51c (patch)
tree6a1e94bf9c3a88c61ae5b730aadb305957f37893 /cont.c
parentc84586b78560028ef14c15e9c23169fe2e6e57ee (diff)
`ec` has `thread_ptr`.
* cont.c (rb_context_struct): move rb_context_t::thread_ptr to rb_execution_context_t::thread_ptr. * cont.c (rb_fiberptr_thread_ptr): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/cont.c b/cont.c
index 4e865c5..8537875 100644
--- a/cont.c
+++ b/cont.c
@@ -110,7 +110,6 @@ typedef struct rb_context_struct {
rb_jmpbuf_t jmpbuf;
rb_ensure_entry_t *ensure_array;
rb_ensure_list_t *ensure_list;
- rb_thread_t *thread_ptr;
} rb_context_t;
@@ -267,7 +266,7 @@ NOINLINE(static VALUE cont_capture(volatile int *volatile stat));
static VALUE
cont_thread_value(const rb_context_t *cont)
{
- return cont->thread_ptr->self;
+ return cont->saved_ec.thread_ptr->self;
}
static void
@@ -396,12 +395,6 @@ cont_memsize(const void *ptr)
return size;
}
-rb_thread_t *
-rb_fiberptr_thread_ptr(const rb_fiber_t *fib)
-{
- return fib->cont.thread_ptr;
-}
-
void
rb_fiber_mark_self(const rb_fiber_t *fib)
{
@@ -550,7 +543,7 @@ cont_init(rb_context_t *cont, rb_thread_t *th)
{
/* save thread context */
cont_save_thread(cont, th);
- cont->thread_ptr = th;
+ cont->saved_ec.thread_ptr = th;
cont->saved_ec.local_storage = NULL;
cont->saved_ec.local_storage_recursive_hash = Qnil;
cont->saved_ec.local_storage_recursive_hash_for_trace = Qnil;
@@ -1474,7 +1467,7 @@ rb_threadptr_root_fiber_setup(rb_thread_t *th)
MEMZERO(fib, rb_fiber_t, 1);
fib->cont.type = ROOT_FIBER_CONTEXT;
fib->cont.saved_ec.fiber = fib;
- fib->cont.thread_ptr = th;
+ fib->cont.saved_ec.thread_ptr = th;
fiber_status_set(fib, FIBER_RESUMED); /* skip CREATED */
th->ec = &fib->cont.saved_ec;
#if FIBER_USE_NATIVE