From 4f0c9a5cc49cf36f15af85f644982fbb847f0dca Mon Sep 17 00:00:00 2001 From: ko1 Date: Sun, 10 Sep 2017 15:49:45 +0000 Subject: 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 --- thread_win32.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'thread_win32.c') diff --git a/thread_win32.c b/thread_win32.c index 5b42310679..683fafc5ba 100644 --- a/thread_win32.c +++ b/thread_win32.c @@ -546,8 +546,8 @@ native_thread_init_stack(rb_thread_t *th) size = end - base; space = size / 5; if (space > 1024*1024) space = 1024*1024; - th->machine.stack_start = (VALUE *)end - 1; - th->machine.stack_maxsize = size - space; + th->ec.machine.stack_start = (VALUE *)end - 1; + th->ec.machine.stack_maxsize = size - space; } #ifndef InterlockedExchangePointer @@ -575,7 +575,7 @@ thread_start_func_1(void *th_ptr) thread_debug("thread created (th: %p, thid: %p, event: %p)\n", th, th->thread_id, th->native_thread_data.interrupt_event); - thread_start_func_2(th, th->machine.stack_start, rb_ia64_bsp()); + thread_start_func_2(th, th->ec.machine.stack_start, rb_ia64_bsp()); w32_close_handle(thread_id); thread_debug("thread deleted (th: %p)\n", th); -- cgit v1.2.3