summaryrefslogtreecommitdiff
path: root/mark_rts.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2023-01-29 00:21:31 +0300
committerIvan Maidanski <ivmai@mail.ru>2023-01-30 09:43:45 +0300
commitbfad0eb3d323bf609f0fe071b20518c23c1baf73 (patch)
tree096e993d7a53cee6ac9ad47e0ad5960354dfae22 /mark_rts.c
parent895d7f907e12a3c81a0e8d1c19f51f6c4147dea8 (diff)
downloadbdwgc-bfad0eb3d323bf609f0fe071b20518c23c1baf73.tar.gz
Remove unused DCL_LOCK_STATE
(refactoring) * alloc.c (GC_set_disable_automatic_collection, GC_set_stop_func, GC_get_disable_automatic_collection, GC_get_stop_func, GC_set_start_callback, GC_get_start_callback, GC_set_on_collection_event, GC_get_on_collection_event, GC_collect_a_little, GC_try_to_collect_general, GC_expand_hp): Remove DCL_LOCK_STATE. * alloc.c [!GC_DISABLE_INCREMENTAL] (GC_start_incremental_collection): Likewise. * dbg_mlc.c (GC_generate_random_backtrace, store_debug_info, GC_debug_register_displacement): Likewise. * dyn_load.c [DARWIN_DEBUG && !NO_DEBUGGING] (GC_dyld_image_add, GC_dyld_image_remove): Likewise. * finalize.c (GC_register_disappearing_link_inner, GC_unregister_disappearing_link, GC_complete_ongoing_collection, GC_set_toggleref_func, GC_get_toggleref_func, GC_toggleref_add, GC_set_await_finalize_proc, GC_get_await_finalize_proc, GC_unregister_long_link, GC_move_disappearing_link, GC_move_long_link, GC_register_finalizer_inner, GC_finalize, GC_invoke_finalizers, GC_notify_or_invoke_finalizers): Likewise. * fnlz_mlc.c (GC_init_finalized_malloc): Likewise. * gc_dlopen.c [!USE_PROC_FOR_LIBRARIES] (disable_gc_for_dlopen): Likewise. * gcj_mlc.c (GC_init_gcj_malloc, maybe_finalize, GC_core_gcj_malloc, GC_debug_gcj_malloc, GC_gcj_malloc_ignore_off_page): Likewise. * malloc.c (GC_alloc_large, GC_generic_malloc_inner, GC_generic_malloc_aligned, GC_malloc_kind_global, GC_generic_malloc_uncollectable, GC_free): Likewise. * mallocx.c (GC_realloc, GC_generic_malloc_ignore_off_page, GC_generic_malloc_many): Likewise. * mark.c (GC_print_trace): Likewise. * mark_rts.c (GC_add_roots, GC_clear_roots, GC_remove_roots): Likewise. * misc.c (GC_get_heap_usage_safe, GC_get_heap_usage_safe, GC_is_init_called, GC_init, GC_enable_incremental, GC_start_mark_threads, GC_set_warn_proc, GC_get_warn_proc, GC_set_abort_func, GC_get_abort_func, GC_enable, GC_disable, GC_new_free_list, GC_new_kind, GC_new_proc, GC_call_with_alloc_lock, GC_dump, GC_get_memory_use, GC_alloc_lock, GC_set_on_thread_event, GC_get_on_thread_event, GC_set_oom_fn, GC_get_oom_fn, GC_set_on_heap_resize, GC_get_on_heap_resize, GC_set_finalizer_notifier, GC_get_finalizer_notifier, GC_set_all_interior_pointers): Likewise. * obj_map.c (GC_register_displacement): Likewise. * os_dep.c (GC_get_stack_base, GC_print_callers): Likewise. * pthread_stop_world.c [GC_ENABLE_SUSPEND_THREAD] (GC_suspend_thread, GC_resume_thread, GC_is_thread_suspended): Likewise. * pthread_support.c (GC_is_thread_tsd_valid, GC_thread_is_registered, GC_register_altstack, GC_wait_for_gc_completion, GC_init_parallel, GC_do_blocking_inner, GC_suspend_self_blocked, GC_get_my_stackbottom, GC_call_with_gc_active, GC_unregister_my_thread, GC_pthread_cancel, GC_pthread_exit, GC_allow_register_threads, GC_register_my_thread, GC_thread_exit_proc, GC_pthread_join, GC_pthread_detach, GC_start_rtn_prepare_thread): Likewise. * ptr_chck.c (GC_set_same_obj_print_proc, GC_get_same_obj_print_proc, GC_set_is_valid_displacement_print_proc, GC_set_is_visible_print_proc, GC_get_is_valid_displacement_print_proc, GC_get_is_visible_print_proc): Likewise. * reclaim.c (GC_print_all_errors): Likewise. * typd_mlc.c (GC_add_ext_descriptor, GC_make_descriptor, GC_malloc_explicitly_typed_ignore_off_page, GC_calloc_explicitly_typed): Likewise. * alloc.c (GC_max_retries): Change type from GC_word to word. * include/private/gc_locks.h: Remove DCL_LOCK_STATE from comment, * include/private/gc_locks.h (DCL_LOCK_STATE): Do not define.
Diffstat (limited to 'mark_rts.c')
-rw-r--r--mark_rts.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/mark_rts.c b/mark_rts.c
index d4bd6fb7..bb39e9da 100644
--- a/mark_rts.c
+++ b/mark_rts.c
@@ -146,8 +146,6 @@ GC_INNER word GC_root_size = 0;
GC_API void GC_CALL GC_add_roots(void *b, void *e)
{
- DCL_LOCK_STATE;
-
if (!EXPECT(GC_is_initialized, TRUE)) GC_init();
LOCK();
GC_add_roots_inner((ptr_t)b, (ptr_t)e, FALSE);
@@ -268,8 +266,6 @@ void GC_add_roots_inner(ptr_t b, ptr_t e, GC_bool tmp)
GC_API void GC_CALL GC_clear_roots(void)
{
- DCL_LOCK_STATE;
-
if (!EXPECT(GC_is_initialized, TRUE)) GC_init();
LOCK();
# ifdef THREADS
@@ -340,8 +336,6 @@ STATIC void GC_remove_roots_inner(ptr_t b, ptr_t e);
GC_API void GC_CALL GC_remove_roots(void *b, void *e)
{
- DCL_LOCK_STATE;
-
/* Quick check whether has nothing to do */
if ((((word)b + (sizeof(word) - 1)) & ~(word)(sizeof(word) - 1)) >=
((word)e & ~(word)(sizeof(word) - 1)))
@@ -602,8 +596,6 @@ GC_INNER void GC_exclude_static_roots_inner(void *start, void *finish)
GC_API void GC_CALL GC_exclude_static_roots(void *b, void *e)
{
- DCL_LOCK_STATE;
-
if (b == e) return; /* nothing to exclude? */
/* Round boundaries (in direction reverse to that of GC_add_roots). */