From 950cae58e75c13a9602f05e5f771f715c1ea4100 Mon Sep 17 00:00:00 2001 From: rm155 Date: Mon, 21 Oct 2024 23:06:15 -0400 Subject: [PATCH] Delete unneeded remove_local_immune_object function --- objspace_coordinator.c | 13 ------------- objspace_coordinator.h | 1 - 2 files changed, 14 deletions(-) diff --git a/objspace_coordinator.c b/objspace_coordinator.c index c7c6f1fdf5b1c4..4d52f53b491c9e 100644 --- a/objspace_coordinator.c +++ b/objspace_coordinator.c @@ -746,19 +746,6 @@ add_local_immune_object(VALUE obj) WITH_OBJSPACE_GATE_LEAVE(source_gate); } -void -remove_local_immune_object(VALUE obj) -{ - WITH_OBJSPACE_GATE_ENTER(obj, os_gate); - { - rb_native_mutex_lock(&os_gate->local_immune_tbl_lock); - bool deleted = !!st_delete(os_gate->local_immune_tbl, (st_data_t *) &obj, NULL); - if (deleted) os_gate->local_immune_count--; - rb_native_mutex_unlock(&os_gate->local_immune_tbl_lock); - } - WITH_OBJSPACE_GATE_LEAVE(os_gate); -} - void mark_local_immune_tbl(rb_objspace_gate_t *os_gate) { diff --git a/objspace_coordinator.h b/objspace_coordinator.h index 60e171efa111b7..f4b153f6bdb565 100644 --- a/objspace_coordinator.h +++ b/objspace_coordinator.h @@ -280,7 +280,6 @@ bool external_reference_tbl_empty(rb_objspace_gate_t *os_gate); #define MUTABLE_SHAREABLE(obj) (!OBJ_FROZEN(obj) && rb_ractor_shareable_p(obj)) void add_local_immune_object(VALUE obj); -void remove_local_immune_object(VALUE obj); void mark_local_immune_tbl(rb_objspace_gate_t *os_gate); void update_local_immune_tbl(rb_objspace_gate_t *os_gate); bool rb_local_immune_tbl_contains(rb_objspace_gate_t *os_gate, VALUE obj, bool lock_needed);