Move RB_VM_SAVE_MACHINE_CONTEXT to internal/thread.h

This commit is contained in:
Matt Valentine-House 2023-03-08 10:45:59 +00:00
Родитель 60b8c7d9fd
Коммит 4ae9c34a4e
4 изменённых файлов: 9 добавлений и 7 удалений

Просмотреть файл

@ -17621,6 +17621,7 @@ vm_sync.$(OBJEXT): $(top_srcdir)/internal/gc.h
vm_sync.$(OBJEXT): $(top_srcdir)/internal/imemo.h vm_sync.$(OBJEXT): $(top_srcdir)/internal/imemo.h
vm_sync.$(OBJEXT): $(top_srcdir)/internal/serial.h vm_sync.$(OBJEXT): $(top_srcdir)/internal/serial.h
vm_sync.$(OBJEXT): $(top_srcdir)/internal/static_assert.h vm_sync.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
vm_sync.$(OBJEXT): $(top_srcdir)/internal/thread.h
vm_sync.$(OBJEXT): $(top_srcdir)/internal/variable.h vm_sync.$(OBJEXT): $(top_srcdir)/internal/variable.h
vm_sync.$(OBJEXT): $(top_srcdir)/internal/vm.h vm_sync.$(OBJEXT): $(top_srcdir)/internal/vm.h
vm_sync.$(OBJEXT): $(top_srcdir)/internal/warnings.h vm_sync.$(OBJEXT): $(top_srcdir)/internal/warnings.h

Просмотреть файл

@ -13,6 +13,13 @@
struct rb_thread_struct; /* in vm_core.h */ 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 */ /* thread.c */
#define COVERAGE_INDEX_LINES 0 #define COVERAGE_INDEX_LINES 0
#define COVERAGE_INDEX_BRANCHES 1 #define COVERAGE_INDEX_BRANCHES 1

Просмотреть файл

@ -1819,13 +1819,6 @@ RUBY_EXTERN unsigned int ruby_vm_event_local_num;
#define GET_THREAD() rb_current_thread() #define GET_THREAD() rb_current_thread()
#define GET_EC() rb_current_execution_context(true) #define GET_EC() rb_current_execution_context(true)
#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)
static inline rb_thread_t * static inline rb_thread_t *
rb_ec_thread_ptr(const rb_execution_context_t *ec) rb_ec_thread_ptr(const rb_execution_context_t *ec)
{ {

Просмотреть файл

@ -1,4 +1,5 @@
#include "internal/gc.h" #include "internal/gc.h"
#include "internal/thread.h"
#include "vm_core.h" #include "vm_core.h"
#include "vm_sync.h" #include "vm_sync.h"
#include "ractor_core.h" #include "ractor_core.h"