From bef3eb544025cc4bd4c9c7b87a8ffe4966db6faa Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Mon, 7 Dec 2020 00:07:30 +0900 Subject: fix decl of ruby_single_main_ractor On windows, MJIT doesn't work without this patch because of the declaration of ruby_single_main_ractor. This patch fix this issue and move the definition of it from ractor.c to vm.c to locate near place of ruby_current_vm_ptr. --- vm_core.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'vm_core.h') diff --git a/vm_core.h b/vm_core.h index 6b975ac3ef..f4517233ec 100644 --- a/vm_core.h +++ b/vm_core.h @@ -1733,6 +1733,7 @@ rb_execution_context_t *rb_vm_main_ractor_ec(rb_vm_t *vm); // ractor.c #if RUBY_VM_THREAD_MODEL == 2 RUBY_SYMBOL_EXPORT_BEGIN +RUBY_EXTERN struct rb_ractor_struct *ruby_single_main_ractor; // ractor.c RUBY_EXTERN rb_vm_t *ruby_current_vm_ptr; RUBY_EXTERN rb_event_flag_t ruby_vm_event_flags; RUBY_EXTERN rb_event_flag_t ruby_vm_event_enabled_global_flags; @@ -1799,8 +1800,6 @@ rb_current_thread(void) return rb_ec_thread_ptr(ec); } -extern struct rb_ractor_struct *ruby_single_main_ractor; // ractor.c - static inline rb_ractor_t * rb_current_ractor(void) { -- cgit v1.2.3