Move RB_GC_SAVE_MACHINE_CONTEXT to vm_core.h
This commit is contained in:
parent
de174681f7
commit
5791aa6263
Notes:
git
2023-03-15 21:26:50 +00:00
@ -33,13 +33,6 @@ NOINLINE(void rb_gc_set_stack_end(VALUE **stack_end_p));
|
||||
#define USE_CONSERVATIVE_STACK_END
|
||||
#endif
|
||||
|
||||
#define RB_GC_SAVE_MACHINE_CONTEXT(th) \
|
||||
do { \
|
||||
FLUSH_REGISTER_WINDOWS; \
|
||||
setjmp((th)->ec->machine.regs); \
|
||||
SET_MACHINE_STACK_END(&(th)->ec->machine.stack_end); \
|
||||
} while (0)
|
||||
|
||||
/* for GC debug */
|
||||
|
||||
#ifndef RUBY_MARK_FREE_DEBUG
|
||||
|
@ -1819,6 +1819,13 @@ RUBY_EXTERN unsigned int ruby_vm_event_local_num;
|
||||
#define GET_THREAD() rb_current_thread()
|
||||
#define GET_EC() rb_current_execution_context(true)
|
||||
|
||||
#define RB_GC_SAVE_MACHINE_CONTEXT(th) \
|
||||
do { \
|
||||
FLUSH_REGISTER_WINDOWS; \
|
||||
setjmp((th)->ec->machine.regs); \
|
||||
SET_MACHINE_STACK_END(&(th)->ec->machine.stack_end); \
|
||||
} while (0)
|
||||
|
||||
static inline rb_thread_t *
|
||||
rb_ec_thread_ptr(const rb_execution_context_t *ec)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user