diff options
author | Matt Valentine-House <matt@eightbitraptor.com> | 2023-03-07 18:13:46 +0000 |
---|---|---|
committer | Matt Valentine-House <matt@eightbitraptor.com> | 2023-03-15 21:26:26 +0000 |
commit | 5791aa6263f730e3b2c8d4a4fb7a054539cf6135 (patch) | |
tree | 82a936cc7f543096c81094fbdde864608ba9799f /vm_core.h | |
parent | de174681f7db3cc84ee8c55cafe89bb85a77e945 (diff) | |
download | ruby-5791aa6263f730e3b2c8d4a4fb7a054539cf6135.tar.gz |
Move RB_GC_SAVE_MACHINE_CONTEXT to vm_core.h
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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) { |