diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-29 12:57:04 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-29 12:57:04 +0000 |
commit | 382aa678d093904762f352063689577b3269a51c (patch) | |
tree | 6a1e94bf9c3a88c61ae5b730aadb305957f37893 /vm_core.h | |
parent | c84586b78560028ef14c15e9c23169fe2e6e57ee (diff) | |
download | ruby-382aa678d093904762f352063689577b3269a51c.tar.gz |
`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 'vm_core.h')
-rw-r--r-- | vm_core.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -771,6 +771,8 @@ typedef struct rb_execution_context_struct { /* for bmethod */ const rb_callable_method_entry_t *passed_bmethod_me; + struct rb_thread_struct *thread_ptr; + /* for GC */ struct { VALUE *stack_start; @@ -1594,20 +1596,18 @@ RUBY_SYMBOL_EXPORT_END #define GET_THREAD() ruby_current_thread() #define GET_EC() ruby_current_execution_context() -rb_thread_t *rb_fiberptr_thread_ptr(const rb_fiber_t *fib); - static inline rb_thread_t * rb_ec_thread_ptr(const rb_execution_context_t *ec) { - return rb_fiberptr_thread_ptr(ec->fiber); + return ec->thread_ptr; } static inline rb_vm_t * rb_ec_vm_ptr(const rb_execution_context_t *ec) { - const rb_thread_t *th = rb_fiberptr_thread_ptr(ec->fiber); + const rb_thread_t *th = rb_ec_thread_ptr(ec); if (th) { - return rb_fiberptr_thread_ptr(ec->fiber)->vm; + return th->vm; } else { return NULL; |