@@ -610,6 +610,7 @@ typedef struct gc_function_map {
610610 void (* start )(void * objspace_ptr , bool full_mark , bool immediate_mark , bool immediate_sweep , bool compact );
611611 bool (* during_gc_p )(void * objspace_ptr );
612612 void (* prepare_heap )(void * objspace_ptr );
613+ void (* wait_for_background_sweep )(void * objspace_ptr );
613614 void (* gc_enable )(void * objspace_ptr );
614615 void (* gc_disable )(void * objspace_ptr , bool finish_current_gc );
615616 bool (* gc_enabled_p )(void * objspace_ptr );
@@ -789,6 +790,7 @@ ruby_modular_gc_init(void)
789790 load_modular_gc_func (start );
790791 load_modular_gc_func (during_gc_p );
791792 load_modular_gc_func (prepare_heap );
793+ load_modular_gc_func (wait_for_background_sweep );
792794 load_modular_gc_func (gc_enable );
793795 load_modular_gc_func (gc_disable );
794796 load_modular_gc_func (gc_enabled_p );
@@ -877,6 +879,7 @@ ruby_modular_gc_init(void)
877879# define rb_gc_impl_start rb_gc_functions.start
878880# define rb_gc_impl_during_gc_p rb_gc_functions.during_gc_p
879881# define rb_gc_impl_prepare_heap rb_gc_functions.prepare_heap
882+ # define rb_gc_impl_wait_for_background_sweep rb_gc_functions.wait_for_background_sweep
880883# define rb_gc_impl_gc_enable rb_gc_functions.gc_enable
881884# define rb_gc_impl_gc_disable rb_gc_functions.gc_disable
882885# define rb_gc_impl_gc_enabled_p rb_gc_functions.gc_enabled_p
@@ -5846,6 +5849,12 @@ rb_gc_before_fork(void)
58465849 rb_gc_impl_before_fork (rb_gc_get_objspace ());
58475850}
58485851
5852+ void
5853+ rb_gc_wait_for_background_sweep (void )
5854+ {
5855+ rb_gc_impl_wait_for_background_sweep (rb_gc_get_objspace ());
5856+ }
5857+
58495858void
58505859rb_gc_after_fork (rb_pid_t pid )
58515860{
0 commit comments