diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-10 15:49:45 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-10 15:49:45 +0000 |
commit | 4f0c9a5cc49cf36f15af85f644982fbb847f0dca (patch) | |
tree | acfb66f8c2b3df4b0572647f35b77a2d5b722ff0 /thread.c | |
parent | 83299c73f36a56442a24de26f049f1a21d724d5c (diff) | |
download | ruby-4f0c9a5cc49cf36f15af85f644982fbb847f0dca.tar.gz |
move th->machine to ec->machine.
* vm_core.h: move rb_thread_t::machine to rb_execution_context_t::machine.
* vm_core.h, gc.c (rb_gc_mark_machine_stack): accept ec instead of th.
it enables to call this func from rb_execution_context_mark() in vm.c.
* cont.c (fiber_setcontext): catch up this fix.
fiber_restore_thread() restores machine stack information too.
* gc.c: catch up structure layout changes.
* thread.c: ditto.
* thread_pthread.c: ditto.
* thread_win32.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -138,8 +138,8 @@ static inline void blocking_region_end(rb_thread_t *th, struct rb_blocking_regio do { \ FLUSH_REGISTER_WINDOWS; \ RB_GC_SAVE_MACHINE_REGISTER_STACK(th); \ - setjmp((th)->machine.regs); \ - SET_MACHINE_STACK_END(&(th)->machine.stack_end); \ + setjmp((th)->ec.machine.regs); \ + SET_MACHINE_STACK_END(&(th)->ec.machine.stack_end); \ } while (0) #define GVL_UNLOCK_BEGIN() do { \ @@ -525,9 +525,9 @@ thread_cleanup_func_before_exec(void *th_ptr) { rb_thread_t *th = th_ptr; th->status = THREAD_KILLED; - th->machine.stack_start = th->machine.stack_end = 0; + th->ec.machine.stack_start = th->ec.machine.stack_end = NULL; #ifdef __ia64 - th->machine.register_stack_start = th->machine.register_stack_end = 0; + th->ec.machine.register_stack_start = th->ec.machine.register_stack_end = NULL; #endif } @@ -613,9 +613,9 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s ruby_thread_set_native(th); - th->machine.stack_start = stack_start; + th->ec.machine.stack_start = stack_start; #ifdef __ia64 - th->machine.register_stack_start = register_stack_start; + th->ec.machine.register_stack_start = register_stack_start; #endif thread_debug("thread start: %p\n", (void *)th); |