summaryrefslogtreecommitdiff
path: root/yjit.c
diff options
context:
space:
mode:
Diffstat (limited to 'yjit.c')
-rw-r--r--yjit.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/yjit.c b/yjit.c
index 5bb8a37e53..a9d1d2c38b 100644
--- a/yjit.c
+++ b/yjit.c
@@ -1100,6 +1100,14 @@ object_shape_count(rb_execution_context_t *ec, VALUE self)
return ULONG2NUM((unsigned long)GET_VM()->next_shape_id);
}
+// Assert that we have the VM lock. Relevant mostly for multi ractor situations.
+// The GC takes the lock before calling us, and this asserts that it indeed happens.
+void
+rb_yjit_assert_holding_vm_lock(void)
+{
+ ASSERT_vm_locking();
+}
+
// Primitives used by yjit.rb
VALUE rb_yjit_stats_enabled_p(rb_execution_context_t *ec, VALUE self);
VALUE rb_yjit_trace_exit_locations_enabled_p(rb_execution_context_t *ec, VALUE self);