-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(refactoring) Issue #473 (bdwgc). * alloc.c (GC_get_disable_automatic_collection, GC_get_stop_func, GC_get_start_callback, GC_get_on_collection_event): Use READER_LOCK/UNLOCK() instead of exclusive LOCK/UNLOCK(). * dyn_load.c [DARWIN_DEBUG && !NO_DEBUGGING] (GC_dyld_image_add, GC_dyld_image_remove): Likewise. * finalize.c (GC_get_toggleref_func, GC_get_await_finalize_proc, GC_get_interrupt_finalizers): Likewise. * mark.c (GC_get_on_mark_stack_empty, GC_print_trace): Likewise. * misc.c (GC_get_heap_usage_safe, GC_get_prof_stats, GC_get_warn_proc, GC_get_abort_func, GC_dump, GC_get_memory_use, GC_get_oom_fn, GC_get_on_heap_resize, GC_get_finalizer_notifier): Likewise. * pthread_stop_world.c [GC_ENABLE_SUSPEND_THREAD] (GC_is_thread_suspended): Likewise. * pthread_support.c (GC_self_thread, GC_get_my_stackbottom, GC_get_on_thread_event, GC_get_sp_corrector): Likewise. * ptr_chck.c (GC_get_same_obj_print_proc, GC_get_is_valid_displacement_print_proc, GC_get_is_visible_print_proc): Likewise. * headers.c (GC_next_block, GC_prev_block): Replace I_HOLD_LOCK() to I_HOLD_READER_LOCK(). * mark_rts.c (GC_roots_present): Likewise. * pthread_support.c (GC_count_threads, GC_segment_is_thread_stack, GC_greatest_stack_base_below): Likewise. * reclaim.c (GC_enumerate_reachable_objects_inner): Likewise. * win32_threads.c [GC_PTHREADS] (GC_lookup_by_pthread): Likewise. * include/gc/gc.h (GC_get_oom_fn, GC_get_on_heap_resize, GC_get_on_collection_event, GC_get_on_thread_event, GC_get_finalizer_notifier, GC_get_same_obj_print_proc, GC_get_disable_automatic_collection, GC_get_stop_func, GC_get_heap_usage_safe, GC_get_memory_use, GC_get_toggleref_func, GC_get_await_finalize_proc, GC_get_interrupt_finalizers, GC_get_warn_proc, GC_get_abort_func, GC_get_my_stackbottom, GC_dump): Update comment that the allocator lock is aquired in the reader mode. * include/gc/gc.h [GC_THREADS] (GC_thread_is_registered, GC_get_sp_corrector): Likewise. * include/gc/gc_inline.h (GC_print_free_list): Likewise. * include/gc/gc_mark.h (GC_get_start_callback, GC_get_on_mark_stack_empty): Likewise. * include/gc/javaxfc.h [GC_THREADS] (GC_is_thread_suspended): Likewise. * include/gc/gc.h (GC_get_heap_size, GC_REVEAL_POINTER): Update comment that it is enough for the caller to hold the allocator lock in the reader mode. * include/gc/gc_mark.h (GC_iterate_free_hblks, GC_apply_to_all_blocks, GC_is_black_listed, GC_is_marked, GC_enumerate_reachable_objects_inner): Likewise. * misc.c [THREADS] (GC_get_prof_stats_unsafe): Likewise. * pthread_support.c (GC_lookup_thread): Likewise. * reclaim.c (GC_print_free_list): Likewise. * include/private/gc_locks.h: Mention I_HOLD_READER_LOCK() in comment about I_[DONT_]HOLD_LOCK. * include/private/gc_locks.h [!READER_LOCK] (READER_LOCK, READER_UNLOCK): Define macro (redirect to [UN]LOCK). * include/private/gc_locks.h [!READER_LOCK && GC_ASSERTIONS] (I_HOLD_READER_LOCK): Define macro (redirect to I_HOLD_LOCK); add comment. * misc.c (GC_set_stackbottom): Use UNUSED_ARG() instead of cast to void. * pthread_support.c [GC_PTHREADS] (GC_pthread_join, GC_pthread_detach): Use READER_LOCK/UNLOCK() instead of exclusive LOCK/UNLOCK() to call GC_lookup_by_pthread(). * win32_threads.c [GC_PTHREADS] (GC_win32_cache_self_pthread): Add assertion that the lock is held (in the exclusive mode). * win32_threads.c (GC_get_next_stack): Likewise.
- Loading branch information
Showing
17 changed files
with
195 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.