summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-28 06:09:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-28 06:09:58 +0000
commit628f75b7524c8cd10bb2760c62d2311dbfeed70d (patch)
tree888a11126a5ec963e8902b5a6a197917160d6688 /thread.c
parentd248a2c96eb50df5b562a5da45d4b2fb05500854 (diff)
vm_core.h: rb_thread_struct::machine
* vm_core.h (rb_thread_struct): aggregate cpu stuff into a struct, so that a debugger can show its content at once. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/thread.c b/thread.c
index 0e743c68e0..b1dcc5bbde 100644
--- a/thread.c
+++ b/thread.c
@@ -121,7 +121,7 @@ static inline void blocking_region_end(rb_thread_t *th, struct rb_blocking_regio
#ifdef __ia64
#define RB_GC_SAVE_MACHINE_REGISTER_STACK(th) \
- do{(th)->machine_register_stack_end = rb_ia64_bsp();}while(0)
+ do{(th)->machine.register_stack_end = rb_ia64_bsp();}while(0)
#else
#define RB_GC_SAVE_MACHINE_REGISTER_STACK(th)
#endif
@@ -129,8 +129,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)->machine.regs); \
+ SET_MACHINE_STACK_END(&(th)->machine.stack_end); \
} while (0)
#define GVL_UNLOCK_BEGIN() do { \
@@ -465,9 +465,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->machine.stack_start = th->machine.stack_end = 0;
#ifdef __ia64
- th->machine_register_stack_start = th->machine_register_stack_end = 0;
+ th->machine.register_stack_start = th->machine.register_stack_end = 0;
#endif
}
@@ -519,9 +519,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->machine.stack_start = stack_start;
#ifdef __ia64
- th->machine_register_stack_start = register_stack_start;
+ th->machine.register_stack_start = register_stack_start;
#endif
thread_debug("thread start: %p\n", (void *)th);