diff options
author | Matt Valentine-House <[email protected]> | 2023-03-08 10:45:59 +0000 |
---|---|---|
committer | Matt Valentine-House <[email protected]> | 2023-03-15 21:26:26 +0000 |
commit | 4ae9c34a4e00d148f206affb3a65926bf3fe230f (patch) | |
tree | 7b99d39dd7d5d910917fc46817004945434323a9 /internal | |
parent | 60b8c7d9fd2e2cb82dae7189a66335b3bec9005f (diff) |
Move RB_VM_SAVE_MACHINE_CONTEXT to internal/thread.h
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7465
Diffstat (limited to 'internal')
-rw-r--r-- | internal/thread.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/thread.h b/internal/thread.h index 2bcc2d242e..7bb4b77a86 100644 --- a/internal/thread.h +++ b/internal/thread.h @@ -13,6 +13,13 @@ struct rb_thread_struct; /* in vm_core.h */ +#define RB_VM_SAVE_MACHINE_CONTEXT(th) \ + do { \ + FLUSH_REGISTER_WINDOWS; \ + setjmp((th)->ec->machine.regs); \ + SET_MACHINE_STACK_END(&(th)->ec->machine.stack_end); \ + } while (0) + /* thread.c */ #define COVERAGE_INDEX_LINES 0 #define COVERAGE_INDEX_BRANCHES 1 |