mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 04:55:21 +02:00
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
This commit is contained in:
parent
d248a2c96e
commit
628f75b752
7 changed files with 124 additions and 120 deletions
14
thread.c
14
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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue