From 750e2a7db7bf61b6e28c1472b106112f07048df4 Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 3 Jul 2014 04:36:58 +0000 Subject: merge revision(s) 44712,44715,44716,44722,44725,44726,44753: [Backport #9454] [Backport #9945] * thread_pthread.c: get current main thread stack size, which may be expanded than allocated size at initialization, by rlimit(). [ruby-core:60113] [Bug #9454] * thread_pthread.c: get current main thread stack size, which may be expanded than allocated size at initialization, by rlimit(). [ruby-core:60113] [Bug #9454] * thread_pthread.c: rlimit is only available on Linux. At least r44712 breaks FreeBSD. [ruby-core:60113] [Bug #9454] * thread_pthread.c (ruby_init_stack, ruby_stack_overflowed_p): place get_stack above others to get stack boundary information. [ruby-core:60113] [Bug #9454] * thread_pthread.c (ruby_init_stack, ruby_stack_overflowed_p): place get_stack above others to get stack boundary information. [ruby-core:60113] [Bug #9454] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@46667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- gc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'gc.c') diff --git a/gc.c b/gc.c index 71fd2ced8f..4b6226a622 100644 --- a/gc.c +++ b/gc.c @@ -2246,14 +2246,14 @@ init_mark_stack(mark_stack_t *stack) #ifdef __ia64 -#define SET_STACK_END (SET_MACHINE_STACK_END(&th->machine_stack_end), th->machine_register_stack_end = rb_ia64_bsp()) +#define SET_STACK_END (SET_MACHINE_STACK_END(&th->machine.stack_end), th->machine.register_stack_end = rb_ia64_bsp()) #else -#define SET_STACK_END SET_MACHINE_STACK_END(&th->machine_stack_end) +#define SET_STACK_END SET_MACHINE_STACK_END(&th->machine.stack_end) #endif -#define STACK_START (th->machine_stack_start) -#define STACK_END (th->machine_stack_end) -#define STACK_LEVEL_MAX (th->machine_stack_maxsize/sizeof(VALUE)) +#define STACK_START (th->machine.stack_start) +#define STACK_END (th->machine.stack_end) +#define STACK_LEVEL_MAX (th->machine.stack_maxsize/sizeof(VALUE)) #if STACK_GROW_DIRECTION < 0 # define STACK_LENGTH (size_t)(STACK_START - STACK_END) @@ -2295,8 +2295,8 @@ stack_check(int water_mark) ret = STACK_LENGTH > STACK_LEVEL_MAX - water_mark; #ifdef __ia64 if (!ret) { - ret = (VALUE*)rb_ia64_bsp() - th->machine_register_stack_start > - th->machine_register_stack_maxsize/sizeof(VALUE) - water_mark; + ret = (VALUE*)rb_ia64_bsp() - th->machine.register_stack_start > + th->machine.register_stack_maxsize/sizeof(VALUE) - water_mark; } #endif return ret; @@ -2518,7 +2518,7 @@ mark_current_machine_context(rb_objspace_t *objspace, rb_thread_t *th) rb_gc_mark_locations(stack_start, stack_end); #ifdef __ia64 - rb_gc_mark_locations(th->machine_register_stack_start, th->machine_register_stack_end); + rb_gc_mark_locations(th->machine.register_stack_start, th->machine.register_stack_end); #endif #if defined(__mc68000__) mark_locations_array(objspace, (VALUE*)((char*)STACK_END + 2), @@ -2535,7 +2535,7 @@ rb_gc_mark_machine_stack(rb_thread_t *th) GET_STACK_BOUNDS(stack_start, stack_end, 0); rb_gc_mark_locations(stack_start, stack_end); #ifdef __ia64 - rb_gc_mark_locations(th->machine_register_stack_start, th->machine_register_stack_end); + rb_gc_mark_locations(th->machine.register_stack_start, th->machine.register_stack_end); #endif } -- cgit v1.2.3