Revert "Wrap rb_objspace_reachable_objects_from_root with RB_VM_LOCK"

This reverts commit 76dc327eeffefe02577999fe5f8215f762a581b6.
This commit is contained in:
Jean Boussier 2023-11-13 08:13:33 +01:00
parent a1887f4dc2
commit f1b95095d6

4
gc.c
View File

@ -11987,8 +11987,6 @@ objspace_reachable_objects_from_root(rb_objspace_t *objspace, void (func)(const
{ {
if (during_gc) rb_bug("objspace_reachable_objects_from_root() is not supported while during_gc == true"); if (during_gc) rb_bug("objspace_reachable_objects_from_root() is not supported while during_gc == true");
RB_VM_LOCK_ENTER();
{
rb_ractor_t *cr = GET_RACTOR(); rb_ractor_t *cr = GET_RACTOR();
struct root_objects_data data = { struct root_objects_data data = {
.func = func, .func = func,
@ -12003,8 +12001,6 @@ objspace_reachable_objects_from_root(rb_objspace_t *objspace, void (func)(const
gc_mark_roots(objspace, &data.category); gc_mark_roots(objspace, &data.category);
cr->mfd = prev_mfd; cr->mfd = prev_mfd;
} }
RB_VM_LOCK_LEAVE();
}
/* /*
------------------------ Extended allocator ------------------------ ------------------------ Extended allocator ------------------------