diff options
Diffstat (limited to 'thread_pthread.c')
-rw-r--r-- | thread_pthread.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index 242b48f15d..675a2ddbae 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -832,8 +832,8 @@ native_thread_init_stack(rb_thread_t *th) rb_nativethread_id_t curr = pthread_self(); if (pthread_equal(curr, native_main_thread.id)) { - th->machine.stack_start = native_main_thread.stack_start; - th->machine.stack_maxsize = native_main_thread.stack_maxsize; + th->ec.machine.stack_start = native_main_thread.stack_start; + th->ec.machine.stack_maxsize = native_main_thread.stack_maxsize; } else { #ifdef STACKADDR_AVAILABLE @@ -841,11 +841,11 @@ native_thread_init_stack(rb_thread_t *th) size_t size; if (get_stack(&start, &size) == 0) { - th->machine.stack_start = start; - th->machine.stack_maxsize = size; + th->ec.machine.stack_start = start; + th->ec.machine.stack_maxsize = size; } #elif defined get_stack_of - if (!th->machine.stack_maxsize) { + if (!th->ec.machine.stack_maxsize) { native_mutex_lock(&th->interrupt_lock); native_mutex_unlock(&th->interrupt_lock); } @@ -854,9 +854,9 @@ native_thread_init_stack(rb_thread_t *th) #endif } #ifdef __ia64 - th->machine.register_stack_start = native_main_thread.register_stack_start; - th->machine.stack_maxsize /= 2; - th->machine.register_stack_maxsize = th->machine.stack_maxsize; + th->ec.machine.register_stack_start = native_main_thread.register_stack_start; + th->ec.machine.stack_maxsize /= 2; + th->ec.machine.register_stack_maxsize = th->ec.machine.stack_maxsize; #endif return 0; } @@ -884,7 +884,7 @@ thread_start_func_1(void *th_ptr) native_thread_init(th); /* run */ #if defined USE_NATIVE_THREAD_INIT - 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()); #else thread_start_func_2(th, &stack_start, rb_ia64_bsp()); #endif @@ -1006,10 +1006,10 @@ native_thread_create(rb_thread_t *th) const size_t stack_size = th->vm->default_params.thread_machine_stack_size; const size_t space = space_size(stack_size); - th->machine.stack_maxsize = stack_size - space; + th->ec.machine.stack_maxsize = stack_size - space; #ifdef __ia64 - th->machine.stack_maxsize /= 2; - th->machine.register_stack_maxsize = th->machine.stack_maxsize; + th->ec.machine.stack_maxsize /= 2; + th->ec.machine.register_stack_maxsize = th->ec.machine.stack_maxsize; #endif #ifdef HAVE_PTHREAD_ATTR_INIT @@ -1032,8 +1032,8 @@ native_thread_create(rb_thread_t *th) #ifdef get_stack_of if (!err) { get_stack_of(th->thread_id, - &th->machine.stack_start, - &th->machine.stack_maxsize); + &th->ec.machine.stack_start, + &th->ec.machine.stack_maxsize); } native_mutex_unlock(&th->interrupt_lock); #endif @@ -1745,8 +1745,8 @@ ruby_stack_overflowed_p(const rb_thread_t *th, const void *addr) else #endif if (th) { - size = th->machine.stack_maxsize; - base = (char *)th->machine.stack_start - STACK_DIR_UPPER(0, size); + size = th->ec.machine.stack_maxsize; + base = (char *)th->ec.machine.stack_start - STACK_DIR_UPPER(0, size); } else { return 0; |