summaryrefslogtreecommitdiff
path: root/mach_dep.c
Commit message (Collapse)AuthorAgeFilesLines
...
* mach_dep.c: Replace C++ style comments with C onesIvan Maidanski2011-09-301-4/+4
|
* Fix mach_dep.c to include sys/ucontext.h on Mac OS X 10.6.Ivan Maidanski2011-09-151-1/+6
| | | | | | | * include/private/gc_priv.h (DARWIN): Include AvailabilityMacros.h (unless MAC_OS_X_VERSION_MAX_ALLOWED already defined). * mach_dep.c (GC_with_callee_saves_pushed): Include sys/ucontext.h (instead of ucontext.h) if Mac OS X 10.6 or higher.
* Replace ARGSUSED comment-based annotation with GCC 'unused' attribute.Ivan Maidanski2011-09-141-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turn on unused-parameter checking for GCC. * alloc.c (GC_try_to_collect_general): Add GC_ATTR_UNUSED attribute to an argument. * tests/test.c (tiny_reverse_test, thr_run_one_test): Likewise. * backgraph.c (reset_back_edge, update_max_height): Replace ARGSUSED annotation with GC_ATTR_UNUSED attribute for some arguments. * checksums.c (GC_add_block): Likewise. * dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change, GC_check_heap_block): Likewise. * finalize.c (GC_null_finalize_mark_proc): Likewise. * gcj_mlc.c (GC_gcj_fake_mark_proc): Likewise. * mark.c (GC_noop, clear_marks_for_block, GC_mark_and_push): Likewise. * mark_rts.c (GC_push_conditional_with_exclusions, GC_push_current_stack): Likewise. * misc.c (GC_default_oom_fn, GC_do_blocking_inner): Likewise. * os_dep.c (GC_fault_handler_openbsd, GC_fault_handler, GC_remove_protection, GC_page_was_dirty, GC_page_was_ever_dirty): Likewise. * pthread_stop_world.c (GC_suspend_handler, GC_suspend_handler_inner): Likewise. * pthread_support.c (GC_do_blocking_inner): Likewise. * stubborn.c (GC_change_stubborn, GC_end_stubborn_change): Likewise. * tests/test.c (fail_proc1): Likewise. * typd_mlc.c (GC_array_mark_proc): Likewise. * win32_threads.c (GC_do_blocking_inner, DllMain): Likewise. * include/private/gc_priv.h (GC_ATTR_UNUSED): Define new macro. * cordxtra.c (CORD_ATTR_UNUSED): Likewise. * cordxtra.c (CORD_nul_func, CORD_lf_close_proc): Replace ARGSUSED annotation with CORD_ATTR_UNUSED attribute for an argument. * mach_dep.c (GC_clear_stack_inner): Remove ARGSUSED annotation and use "limit" argument in the function (to suppress compiler warning). * misc.c (GC_clear_stack_inner): Remove ARGSUSED. * tests/threadkey_test.c (on_thread_exit_inner, on_thread_exit): Use all function arguments (to suppress compiler warning). * configure.ac (CFLAGS): Remove "-Wno-unused-parameter" option.
* 2011-04-26 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | * alloc.c: Don't include sys/types.h for ArmCC. * dyn_load.c: Ditto. * os_dep.c: Ditto. * mach_dep.c (_setjmp, _longjmp): Redirect to setjmp/longjmp for ArmCC. * mark.c (GC_noop): Define specially for ArmCC. * include/private/gc_priv.h (GC_noop): Ditto. * misc.c (GC_init): Don't test pointers comparison for ArmCC. * misc.c: Don't include unistd.h for ArmCC. * os_dep.c (pages_executable): Rename to GC_pages_executable; make STATIC. * os_dep.c (GC_unix_mmap_get_mem): Don't define for ArmCC. * ptr_chck.c (GC_is_visible): Explicitly cast (GC_DS_PER_OBJECT-GC_INDIR_PER_OBJ_BIAS) to word (to suppress a compiler warning). * include/private/gcconfig.h: Recognize __arm. * include/private/gcconfig.h (HBLKPTR): Define for ArmCC. * include/private/gcconfig.h (HBLKPTR): Add parentheses for "bytes" argument.
* 2011-04-24 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-8/+0
| | | | | | | | * mach_dep.c (NO_GETCONTEXT): Move to gcconfig.h. * os_dep.c (GC_write_fault_handler): Don't include ucontext.h if NO_GETCONTEXT. * include/private/gcconfig.h (GETPAGESIZE): Define as a sysconf call for Android.
* 2011-04-11 Ivan Maidanski <ivmai@mail.ru> (really Jie Liu)ivmai2011-07-261-11/+10
| | | | | | | | | * mach_dep.c (NO_GETCONTEXT); Define for RTEMS. * mach_dep.c (GC_with_callee_saves_pushed): Don't call __builtin_unwind_init() for RTEMS; use setjmp() without the leading underscore (for RTEMS). * tests/test.c (BIG): Use smaller value for RTEMS. * tests/test.c (main): Customize for RTEMS.
* 2011-02-19 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-2/+2
| | | | | | | | | | | | * aclocal.m4: Regenerate (by autoreconf -vif using autoconf-2.68, automake-1.11.1 and libtool-2.4). * configure: Ditto. * ltmain.sh: Ditto. * makefile.in: Ditto. * m4/libtool.m4: Ditto. * m4/ltversion.m4: Ditto. * mach_dep.c (GC_with_callee_saves_pushed): Fix FE_ALL_EXCEPT macro.
* 2011-02-09 Ivan Maidanski <ivmai@mail.ru> (mostly Jean-Claude Beaudoin)ivmai2011-07-261-16/+11
| | | | | | * mach_dep.c (GC_with_callee_saves_pushed): Fix and improve code introduced by the previous patch (if GETCONTEXT_FPU_EXCMASK_BUG and X86_64).
* 2011-01-22 Ivan Maidanski <ivmai@mail.ru> (mostly Jean-Claude Beaudoin)ivmai2011-07-261-2/+38
| | | | | | | | | | | * darwin_stop_world.c (GC_FindTopOfStack): Prefix and suffix "volatile" keyword with double underscore. * mach_dep.c (GETCONTEXT_FPU_EXCMASK_BUG): Recognize new macro and include fenv.h if defined (unless NO_GETCONTEXT or HAVE_PUSH_REGS). * mach_dep.c (GC_with_callee_saves_pushed): Restore FPU exception mask corrupted by getcontext if GETCONTEXT_FPU_EXCMASK_BUG. * include/private/gcconfig.h (GETCONTEXT_FPU_EXCMASK_BUG): Define for Linux/amd64 (since its GLibc getcontext currently has the bug).
* 2010-05-21 Ivan Maidanski <ivmai@mail.ru> (really Bradley Smith andivmai2011-07-261-1/+1
| | | | | | | | | | Stefano Rivera) * mach_dep.c (NO_GETCONTEXT): Also define if AVR32. * include/private/gcconfig.h (AVR32): New macro (also define the supplementary macros for the target). * include/private/thread_local_alloc (USE_COMPILER_TLS): Don't define for AVR32.
* 2009-11-06 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-3/+6
| | | | | | | | | * mach_dep.c (GC_push_regs): Remove STATIC (just to catch a duplicate symbol definition linker error). * misc.c (GC_clear_stack_inner): Ditto. * sparc_mach_dep.S (GC_push_regs): Comment out the reference. * sparc_mach_dep.S: Remove trailing spaces at EOLn; remove multiple trailing blank lines.
* 2009-10-22 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * allchblk.c (GC_unmap_old, GC_merge_unmapped, GC_allochblk, GC_freehblk): Use GC_INNER for the function definition. * alloc.c (GC_never_stop_func, GC_should_collect, GC_try_to_collect_inner, GC_collect_a_little_inner, GC_set_fl_marks, GC_add_to_our_memory, GC_add_to_heap, GC_expand_hp_inner, GC_collect_or_expand, GC_allocobj): Ditto. * backgraph.c (GC_build_back_graph, GC_traverse_back_graph): Ditto. * blacklst.c (GC_default_print_heap_obj_proc, GC_bl_init, GC_promote_black_lists, GC_unpromote_black_lists, GC_add_to_black_list_normal, GC_add_to_black_list_stack, GC_is_black_listed): Ditto. * darwin_stop_world.c (GC_push_all_stacks, GC_push_all_stacks, GC_stop_init, GC_stop_world, GC_start_world): Ditto. * dbg_mlc.c (GC_has_other_debug_info, GC_store_back_pointer, GC_marked_for_finalization, GC_generate_random_backtrace_no_gc, GC_store_debug_info, GC_start_debugging, GC_debug_generic_malloc_inner, GC_debug_generic_malloc_inner_ignore_off_page, GC_debug_malloc_uncollectable, GC_debug_free_inner): Ditto. * dyn_load.c (GC_register_dynamic_libraries, GC_register_main_static_data, GC_init_dyld): Ditto. * finalize.c (GC_push_finalizer_structures, GC_finalize, GC_notify_or_invoke_finalizers, GC_print_finalization_stats): Ditto. * gcj_mlc.c (GC_core_gcj_malloc): Ditto. * headers.c (GC_find_header, GC_header_cache_miss, GC_scratch_alloc, GC_init_headers, GC_install_header, GC_install_counts, GC_remove_header, GC_remove_counts, GC_next_used_block, GC_prev_block): Ditto. * mach_dep.c (GC_with_callee_saves_pushed): Ditto. * malloc.c (GC_collect_or_expand, GC_alloc_large, GC_generic_malloc_inner, GC_generic_malloc_inner_ignore_off_page, GC_core_malloc_atomic, GC_core_malloc, GC_free_inner): Ditto. * mallocx.c (GC_generic_malloc_ignore_off_page): Ditto. * mark.c (GC_collection_in_progress, GC_clear_hdr_marks, GC_set_hdr_marks, GC_set_mark_bit, GC_clear_mark_bit, GC_clear_marks, GC_initiate_gc, GC_mark_some, GC_mark_stack_empty, GC_invalidate_mark_state, GC_signal_mark_stack_overflow, GC_mark_from, GC_help_marker, GC_mark_init, GC_push_all, GC_push_conditional, GC_mark_and_push_stack, GC_push_all_eager, GC_push_all_stack): Ditto. * mark_rts.c (GC_is_static_root, GC_roots_present, GC_approx_sp, GC_exclude_static_roots_inner, GC_push_all_register_frames, GC_push_all_stack_frames, GC_cond_register_dynamic_libraries, GC_push_roots): Ditto. * misc.c (GC_extend_size_map, GC_clear_stack, GC_err_write): Ditto. * new_hblk.c (GC_build_fl, GC_new_hblk): Ditto. * obj_map.c (GC_register_displacement_inner, GC_add_map_entry, GC_initialize_offsets): Ditto. * os_dep.c (GC_get_maps, GC_parse_map_entry, GC_text_mapping, GC_init_linux_data_start, GC_init_netbsd_elf, GC_setpagesize, GC_set_and_save_fault_handler, GC_setup_temporary_fault_handler, GC_reset_fault_handler, GC_get_register_stack_base, GC_init_win32, GC_add_current_malloc_heap, GC_is_heap_base, GC_unmap, GC_remap, GC_unmap_gap, GC_push_all_stacks, GC_gww_dirty_init, GC_dirty_init, GC_read_dirty, GC_page_was_dirty, GC_page_was_ever_dirty, GC_remove_protection, GC_write_fault_handler, GC_mprotect_stop, GC_mprotect_resume, GC_save_callers, GC_print_callers): Ditto. * pthread_stop_world.c (GC_push_all_stacks, GC_stop_world, GC_start_world, GC_stop_init): Ditto. * pthread_support.c (GC_mark_thread_local_free_lists, GC_lookup_thread, GC_reset_finalizer_nested, GC_check_finalizer_nested, GC_segment_is_thread_stack, GC_greatest_stack_base_below, GC_thr_init, GC_init_parallel, GC_do_blocking_inner, GC_lock, GC_acquire_mark_lock, GC_release_mark_lock, GC_wait_for_reclaim, GC_notify_all_builder, GC_wait_marker, GC_notify_all_marker): Ditto. * reclaim.c (GC_print_all_errors, GC_block_empty, GC_reclaim_generic, GC_start_reclaim, GC_continue_reclaim, GC_reclaim_all): Ditto. * thread_local_alloc.c (GC_init_thread_local, GC_destroy_thread_local, GC_mark_thread_local_fls_for): Ditto. * win32_threads.c (GC_reset_finalizer_nested, GC_check_finalizer_nested, GC_do_blocking_inner, GC_stop_world, GC_start_world, GC_push_all_stacks, GC_get_next_stack, GC_acquire_mark_lock, GC_release_mark_lock, GC_wait_for_reclaim, GC_notify_all_builder, GC_wait_marker, GC_notify_all_marker, GC_thr_init, GC_init_parallel, GC_lock, GC_mark_thread_local_free_lists): Ditto. * alloc.c (GC_add_current_malloc_heap, GC_build_back_graph, GC_traverse_back_graph): Use GC_INNER for the function prototype. * darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume): Ditto. * dbg_mlc.c (GC_default_print_heap_obj_proc): Ditto. * dyn_load.c (GC_parse_map_entry, GC_get_maps, GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base, GC_get_next_stack): Ditto. * finalize.c (GC_reset_finalizer_nested, GC_check_finalizer_nested): Ditto. * gcj_mlc.c (GC_start_debugging): Ditto. * include/private/dbg_mlc.h (GC_save_callers, GC_print_callers, GC_has_other_debug_info, GC_store_debug_info): Ditto. * include/private/gc_hdrs.h (GC_header_cache_miss): Ditto. * include/private/gc_locks.h (GC_lock): Ditto. * include/private/gc_pmark.h (GC_signal_mark_stack_overflow, GC_mark_from): Ditto. * include/private/pthread_support.h (GC_lookup_thread, GC_stop_init): Ditto. * include/private/thread_local_alloc.h (GC_init_thread_local, GC_destroy_thread_local, GC_mark_thread_local_fls_for): Ditto. * malloc.c (GC_extend_size_map, GC_text_mapping): Ditto. * mark.c (GC_page_was_ever_dirty): Ditto. * mark_rts.c (GC_mark_thread_local_free_lists): Ditto. * misc.c (GC_register_main_static_data, GC_init_win32, GC_setpagesize, GC_init_linux_data_start, GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf, GC_do_blocking_inner): Ditto. * os_dep.c (GC_greatest_stack_base_below): Ditto. * win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init): Ditto. * include/private/gc_priv.h: Ditto (for most prototypes). * include/private/gc_priv.h (GC_INNER): Update the comment. * doc/README.macros (GC_DLL): Update.
* 2009-10-22 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-29/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * alloc.c (GC_collection_in_progress): Move the prototype to gc_priv.h. * gc_dlopen.c (GC_collection_in_progress): Ditto. * pthread_support.c (GC_collection_in_progress): Ditto. * misc.c (GC_init_parallel): Ditto. * pthread_support.c (GC_init_parallel): Ditto. * win32_threads.c (GC_init_parallel): Ditto. * darwin_stop_world.c (GC_thr_init): Ditto. * misc.c (GC_thr_init): Ditto. * pthread_stop_world.c (GC_thr_init): Ditto. * pthread_support.c (GC_thr_init): Ditto. * blacklst.c (GC_clear_bl, GC_copy_bl, GC_number_stack_black_listed): Make STATIC. * dbg_mlc.c (GC_print_obj, GC_make_closure, GC_debug_invoke_finalizer): Ditto. * malloc.c (GC_alloc_large_and_clear): Ditto. * mark.c (GC_push_selected, GC_push_marked1, GC_push_marked2, GC_push_marked4, GC_push_marked, GC_push_next_marked, GC_push_next_marked_dirty, GC_push_next_marked_uncollectable): Ditto. * misc.c (GC_clear_stack_inner): Ditto. * os_dep.c (GC_repeat_read, GC_default_push_other_roots): Ditto. * darwin_stop_world.c (FindTopOfStack): Make static; define only if not DARWIN_DONT_PARSE_STACK. * dbg_mlc.c (GC_debug_free_inner): Define only if DBG_HDRS_ALL. * dyn_load.c (GC_repeat_read): Remove unused prototype. * include/private/gc_pmark.h (GC_find_start): Ditto. * misc.c (GC_read, GC_register_finalizer_no_order): Ditto. * dyn_load.c (GC_segment_is_thread_stack): Add prototype (only if THREADS). * dyn_load.c (GC_register_main_static_data): Define only if DYNAMIC_LOADING. * finalize.c (GC_enqueue_all_finalizers): Remove unnecessary tail "return" statement. * gc_dlopen.c (GC_SOLARIS_THREADS): Don't recognize (since implies GC_PTHREADS). * include/gc.h: Fix a typo. * include/gc_inline.h (GC_ASSERT): Define (if not defined) since the header is public. * include/gc_inline.h (GC_generic_malloc_many): New public function declaration. * mallocx.c (GC_generic_malloc_many): Make public. * include/private/gc_priv.h (GC_INNER): Use visibility attribute (if available). * include/private/gc_priv.h (GC_EXTERN): Define using GC_INNER. * include/private/gc_priv.h: Include atomic_ops.h if THREADS and MPROTECT_VDB. * os_dep.c: Don't include atomic_ops.h * win32_threads.c: Ditto. * include/private/gc_priv.h (GC_push_selected, GC_push_regs, GC_push_marked, GC_number_stack_black_listed, GC_alloc_large_and_clear, GC_reclaim_or_delete_all, GC_generic_malloc_many, GC_make_closure, GC_debug_invoke_finalizer, GC_print_obj, GC_page_was_ever_dirty): Remove the prototype. * mark.c (GC_page_was_ever_dirty): Add prototype (only if PROC_VDB). * include/private/gc_priv.h (GC_push_next_marked_dirty, GC_push_next_marked, GC_push_next_marked_uncollectable): Move the prototype to mark.c. * include/private/gc_priv.h (GC_is_static_root): Declare only if not THREADS. * include/private/gc_priv.h (GC_free_inner): Declare only if THREADS. * include/private/gc_priv.h (GC_debug_free_inner): Declare only if THREADS and DBG_HDRS_ALL. * include/private/gc_priv.h (GC_markers): Declare GC_markers only if PARALLEL_MARK. * include/private/gc_priv.h (GC_register_main_static_data): Move the prototype to misc.c. * mach_dep.c (GC_push_regs): Make STATIC; define only along with HAVE_PUSH_REGS definition. * mach_dep.c (GC_clear_stack_inner): Replace K&R-style function definition with the ANSI C one. * mark.c (GC_started_thread_while_stopped): Declared only if not GNU C. * win32_threads.c (GC_started_thread_while_stopped): Don't define if GNU C. * mark.c (GC_mark_from): Avoid unbalanced brackets in #if-#else-#endif blocks. * mark_rts.c (GC_is_static_root): Define only if not THREADS. * os_dep.c (GC_get_stack_base): Make public (for OpenBSD). * os_dep.c (GC_page_was_ever_dirty): Comment out the function except for PROC_VDB. * tests/test.c (main): Don't reference GC_print_obj, GC_make_closure, GC_debug_invoke_finalizer, GC_page_was_ever_dirty, GC_is_fresh (in GC_noop). * thread_local_alloc.c: Don't include "gc_inline.h". * win32_threads.c (GC_write_fault_handler): Declare only if MPROTECT_VDB.
* 2009-10-21 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * allchblk.c (DEBUG): Remove macro (since unused). * allchblk.c: Include private/gc_priv.h before other includes and definitions. * alloc.c: Ditto. * gc_dlopen.c: Ditto. * headers.c: Ditto. * mallocx.c: Ditto. * mark_rts.c: Ditto. * new_hblk.c: Ditto. * reclaim.c: Ditto. * mark.c: Include private/gc_pmark.h before other includes. * misc.c: Ditto. * dyn_load.c (_GNU_SOURCE): Move the definition to gc_priv.h. * pthread_support.c (_USING_POSIX4A_DRAFT10): Ditto. * pthread_support.c (_POSIX4A_DRAFT10_SOURCE): Remove (since already defined in gc_config_macros.h). * dyn_load.c (GC_init_dyld): Remove parameter cast for _dyld_register_func_for_add_image() and _dyld_register_func_for_remove_image(); add the comment about possible warnings; add FIXME for the deprecated _dyld_bind_fully_image_containing_address(). * include/private/gc_priv.h: Include gc.h before the standard headers inclusion. * tests/test.c: Ditto. * include/private/gcconfig.h (DebugBreak): Update the comment. * typd_mlc.c (ED_INITIAL_SIZE): Remove ';'. * alloc.c: Reformat the code (partly adjust indentation). * backgraph.c: Ditto. * blacklst.c: Ditto. * checksums.c: Ditto. * finalize.c: Ditto. * gcj_mlc.c: Ditto. * mach_dep.c: Ditto. * mark_rts.c: Ditto. * obj_map.c: Ditto. * os_dep.c: Ditto. * ptr_chck.c: Ditto. * stubborn.c: Ditto. * thread_local_alloc.c: Ditto. * typd_mlc.c: Ditto.
* 2009-10-20 Ivan Maidanski <ivmai@mail.ru> (really mostly OpenBSD contributors)ivmai2011-07-261-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (openbsd): Define GC_OPENBSD_THREADS. * configure.ac: Add AM_CONDITIONAL(OPENBSD_THREADS). * configure.ac: Add sparc-openbsd case. * doc/README.macros (GC_NETBSD_THREADS, GC_OPENBSD_THREADS): Document. * tests/test.c (main): Handle OpenBSD case. * extra/threadlibs.c: Add the copyright header; expand all tabs to spaces; remove trailing spaces at EOLn. * include/private/pthread_stop_world.h: Ditto. * extra/threadlibs.c (main): Replace K&R-style function definition with the ANSI C one. * extra/threadlibs.c (main): Handle GC_OPENBSD_THREADS case. * dyn_load.c (OPENBSD): Recognize (similar to NETBSD). * include/gc_config_macros.h (GC_SOLARIS_THREADS): Recognize; define it for OpenBSD. * include/gc_pthread_redirects.h (GC_pthread_sigmask, pthread_sigmask): Don't declare and redefine for OpenBSD. * include/private/gcconfig.h: Handle OpenBSD (on arm, sh, i386, amd64, powerpc). * mach_dep.c (NO_GETCONTEXT): Ditto. * include/private/pthread_stop_world.h (thread_stop_info): Don't define last_stop_count field if OpenBSD. * misc.c (GC_init_dyld): Add declaration (if NetBSD). * misc.c (GC_init): Don't call GC_init_netbsd_elf() for OpenBSD. * os_dep.c (GC_init_netbsd_elf): Don't define for OpenBSD. * os_dep.c (old_segv_act, GC_jmp_buf_openbsd): New static variable (only if OpenBSD). * os_dep.c (GC_fault_handler_openbsd, GC_find_limit_openbsd, GC_skip_hole_openbsd): New static function (only if OpenBSD). * os_dep.c (GC_get_stack_base, GC_get_main_stack_base, GC_register_data_segments): Define specially for OpenBSD case. * os_dep.c (GC_fault_handler_lock): Initialize to AO_TS_INITIALIZER (instead of 0). * pthread_support.c (GC_allocate_lock): Ditto. * pthread_stop_world.c (NSIG, GC_print_sig_mask, GC_remove_allowed_signals, suspend_handler_mask, GC_stop_count, GC_world_is_stopped, GC_retry_signals, SIG_THR_RESTART, GC_suspend_ack_sem, GC_suspend_handler_inner, GC_suspend_handler, GC_restart_handler): Don't define and use if OpenBSD. * pthread_stop_world.c (GC_suspend_all, GC_stop_world, GC_start_world): Handle OpenBSD case. * pthread_stop_world.c (GC_stop_init): Define as empty if OpenBSD. * pthread_support.c (pthread_sigmask): Don't undefine the macro and don't define the wrapper function if OpenBSD. * pthread_support.c (GC_thr_init): Handle OpenBSD case. * configure: Regenerate. * include/private/config.h.in: Ditto.
* 2009-10-19 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/private/gc_priv.h (GC_INNER): New macro (for GC-scope variable definitions). * include/private/gc_priv.h (GC_EXTERN): Update the comment. * allchblk.c (GC_unmap_threshold): Define as GC_INNER. * alloc.c (GC_incremental, GC_world_stopped, GC_n_heap_sects, GC_n_memory, GC_fail_count): Ditto. * blacklst.c (GC_black_list_spacing, GC_print_heap_obj): Ditto. * gcj_mlc.c (GC_gcj_malloc_initialized, GC_gcjobjfreelist): Ditto. * mach_dep.c (GC_save_regs_ret_val): Ditto. * mark.c (GC_n_mark_procs, GC_obj_kinds, GC_n_kinds, GC_mark_stack, GC_mark_stack_limit, GC_mark_stack_size, GC_mark_stack_top, GC_mark_state, GC_mark_stack_too_small, GC_mark_no, GC_markers): Ditto. * mark_rts.c (GC_root_size, GC_push_typed_structures): Ditto. * misc.c (GC_allocate_ml, GC_debugging_started, GC_check_heap, GC_print_all_smashed, GC_print_back_height, GC_dump_regularly, GC_backtraces, GC_force_unmap_on_gcollect, GC_large_alloc_warn_interval, GC_is_initialized, GC_write_cs, GC_current_warn_proc, GC_blocked_sp, GC_activation_frame): Ditto. * os_dep.c (GC_page_size, GC_dont_query_stack_min, GC_no_win32_dlls, GC_wnt, GC_sysinfo, GC_push_other_roots, GC_dirty_maintained, GC_fault_handler_lock): Ditto. * pthread_support.c (GC_allocate_ml, GC_lock_holder, GC_need_to_lock, GC_thr_initialized, GC_threads, GC_in_thread_creation, GC_collecting, GC_allocate_lock, GC_mark_lock_holder): Ditto. * reclaim.c (GC_bytes_found, GC_fl_builder_count, GC_have_errors): Ditto. * win32_threads.c (GC_allocate_ml, GC_lock_holder, GC_need_to_lock, GC_mark_lock_holder, GC_collecting): Ditto. * extra/gc.c (GC_INNER, GC_EXTERN): Define as STATIC. * mach_dep.c (GC_with_callee_saves_pushed): Remove redundant {}. * os_dep.c (GC_init_win32): Reformat the comment.
* 2009-09-30 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * allchblk.c (GC_large_alloc_warn_interval): Move declaration from gc_priv.h. * allchblk.c (GC_large_alloc_warn_suppressed): Move definition from misc.c; define as STATIC. * include/private/gc_priv.h (GC_large_alloc_warn_interval, GC_large_alloc_warn_suppressed): Remove declaration. * alloc.c (GC_bytes_found): Add "defined in" comment. * mallocx.c (GC_bytes_found): Ditto. * misc.c (GC_unmap_threshold): Ditto. * os_dep.c (GC_old_allocator): Ditto. * pthread_support.c (GC_markers): Ditto. * thread_local_alloc.c (GC_gcjobjfreelist, GC_gcj_malloc_initialized, GC_gcj_kind): Ditto. * win32_threads.c (GC_markers): Ditto. * alloc.c (GC_start_time): Explicitly initialize to 0 or NULL (to be distinctive from a variable declaration). * backgraph.c (GC_max_height, GC_deepest_obj): Ditto. * blacklst.c (GC_old_normal_bl, GC_incomplete_normal_bl, GC_old_stack_bl, GC_incomplete_stack_bl): Ditto. * checksums.c (GC_faulted, GC_n_dirty_errors, GC_n_faulted_dirty_errors, GC_n_changed_errors, GC_n_clean, GC_n_dirty, GC_bytes_in_used_blocks): Ditto. * dbg_mlc.c (GC_smashed): Ditto. * finalize.c (GC_old_dl_entries): Ditto. * gcj_mlc.c (GC_gcj_kind, GC_gcj_debug_kind, GC_gcjobjfreelist, GC_gcjdebugobjfreelist): Ditto. * mach_dep.c (GC_save_regs_ret_val): Ditto. * mark.c (GC_n_rescuing_pages, GC_mark_stack, GC_mark_stack_limit, GC_mark_stack_top): Ditto. * misc.c (GC_min_sp, GC_high_water, GC_bytes_allocd_at_reset): Ditto. * os_dep.c (GC_data_start, GC_page_size, GC_sysinfo, GC_old_segv_handler, GC_old_bus_handler, GC_old_bus_handler_used_si, GC_old_segv_handler_used_si, GC_proc_buf, GC_proc_fd, GC_vd_base): Ditto. * pthread_stop_world.c (GC_stop_count, GC_stopping_pid): Ditto. * reclaim.c (GC_leaked): Ditto. * typd_mlc.c (GC_explicit_kind, GC_array_kind, GC_ext_descriptors, GC_typed_mark_proc_index, GC_array_mark_proc_index, GC_eobjfreelist, GC_arobjfreelist): Ditto. * win32_threads.c (GC_pthread_map_cache, GC_marker_cv, GC_marker_Id): Ditto. * dbg_mlc.c (GC_smashed, GC_n_smashed): Define as STATIC. * gcj_mlc.c (GC_gcjdebugobjfreelist): Ditto. * os_dep.c (GC_vd_base): Ditto. * pthread_support.c (GC_mark_threads): Ditto. * reclaim.c (GC_leaked): Ditto. * typd_mlc.c (GC_bm_table): Ditto. * mark_rts.c (GC_save_regs_ret_val): Change declaration type to that of definition; add "defined in" comment. * mark_rts.c (GC_push_current_stack): Remove unnecessary cast for GC_save_regs_ret_val. * misc.c (GC_check_heap, GC_print_all_smashed, GC_start_call_back): Remove unnecessary cast (of 0). * misc.c (GC_LARGE_ALLOC_WARN_INTERVAL): New tuning macro. * misc.c (GC_large_alloc_warn_interval): Initialize to GC_LARGE_ALLOC_WARN_INTERVAL value. * misc.c (GC_tmp): Change to "static". * os_dep.c (GC_setpagesize): Reformat the code (collapse multiple function definitions). * os_dep.c (GC_mprotect_state): Define as static. * pthread_support.c (dummy_thread_local): Prefix with "GC_". * win32_threads.c (WinMain): Remove FIXME for WinCE.
* 2009-09-16 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-101/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ChangeLog: Remove trailing spaces at EOLn; insert blank lines where missed. * doc/README: Expand all tabs to spaces; remove trailing spaces at EOLn; remove multiple trailing blank lines. * doc/README.autoconf: Ditto. * doc/README.DGUX386: Ditto. * doc/README.environment: Ditto. * doc/README.macros: Ditto. * doc/README.win32: Ditto. * tests/test.c: Ditto. * tests/test_cpp.cc: Ditto. * backgraph.c: Ditto. * blacklst.c: Ditto. * checksums.c: Ditto. * darwin_stop_world.c: Ditto. * dbg_mlc.c: Ditto. * dyn_load.c: Ditto. * finalize.c: Ditto. * gc_dlopen.c: Ditto. * gcj_mlc.c: Ditto. * headers.c: Ditto. * mach_dep.c: Ditto. * malloc.c: Ditto. * mallocx.c: Ditto. * new_hblk.c: Ditto. * obj_map.c: Ditto. * ptr_chck.c: Ditto. * real_malloc.c: Ditto. * reclaim.c: Ditto. * stubborn.c: Ditto. * thread_local_alloc.c: Ditto. * typd_mlc.c: Ditto. * gc_cpp.cc: Ditto. * include/gc_allocator.h: Ditto. * include/gc_backptr.h: Ditto. * include/gc_config_macros.h: Ditto. * include/gc_cpp.h: Ditto. * include/gc_gcj.h: Ditto. * include/gc_inline.h: Ditto. * include/gc_mark.h: Ditto. * include/gc_pthread_redirects.h: Ditto. * include/gc_typed.h: Ditto. * include/gc_version.h: Ditto. * include/javaxfc.h: Ditto. * include/new_gc_alloc.h: Ditto. * include/private/darwin_semaphore.h: Ditto. * include/private/dbg_mlc.h: Ditto. * include/private/gc_hdrs.h: Ditto. * include/private/gc_locks.h: Ditto. * include/private/gc_pmark.h: Ditto. * include/private/gcconfig.h: Ditto. * include/private/pthread_support.h: Ditto. * include/private/thread_local_alloc.h: Ditto. * darwin_stop_world.c: Add copyright header. * include/gc_backptr.h: Ditto. * include/gc_config_macros.h: Ditto. * include/gc_pthread_redirects.h: Ditto. * include/gc_version.h: Ditto. * include/javaxfc.h: Ditto. * include/private/darwin_semaphore.h: Ditto. * include/private/pthread_support.h: Ditto. * gc_cpp.cc: Make copyright header uniform across the package. * include/gc_cpp.h: Ditto.
* 2009-09-02 Hans Boehm <Hans.Boehm@hp.com> (with help from Victor Ivrii andhboehm2011-07-261-5/+8
| | | | | | others) * mach_dep.c: Don't include ucontext.h with NO_GETCONTEXT.
* 2009-06-08 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)hboehm2011-07-261-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (diff91_cvs: resembling diff3, diff27, diff33, diff45, diff47, diff49, diff60, diff67, diff68 partly) * alloc.c (GC_FULL_FREQ, GC_DONT_EXPAND, GC_FREE_SPACE_DIVISOR, GC_TIME_LIMIT): New macros (used to control the default initial values of GC_full_freq variable, GC_dont_expand, GC_free_space_divisor, GC_time_limit respectively). * include/private/gc_priv.h (TIME_LIMIT): Remove macro (replaced with GC_TIME_LIMIT in alloc.c). * alloc.c (GC_need_full_gc, GC_stopped_mark, GC_finish_collection): Define as STATIC. * mark_rts.c (GC_push_current_stack, GC_push_gc_structures): Ditto. * include/private/gc_priv.h (GC_stopped_mark, GC_finish_collection): Move the prototypes to alloc.c, make STATIC. * include/private/gc_priv.h (GC_push_current_stack, GC_push_gc_structures, GC_push_regs_and_stack): Remove prototypes (move the comments to the places where these functions are defined). * mach_dep.c (GC_push_regs_and_stack): Move to mark_rts.c and define as STATIC. * alloc.c (GC_timeout_stop_func, GC_stopped_mark, GC_print_heap_sects): Convert a group of printf() calls into a single one (for output atomicity). * mark_rts.c (GC_print_static_roots): Ditto. * alloc.c (GC_stopped_mark): Output blank line (when logging) for convenience to delimit collections. * alloc.c (GC_clear_a_few_frames): Rename NWORDS to CLEAR_NWORDS; make "frames" local variable volatile (to prevent optimization). * alloc.c (GC_try_to_collect_inner, GC_stopped_mark, GC_finish_collection, GC_allocobj): Remove outdated comments about disabling signals. * include/private/gc_priv.h (GC_register_displacement_inner, GC_gcollect_inner): Ditto. * alloc.c (GC_try_to_collect_inner, GC_stopped_mark, GC_finish_collection): Initialize "start_time" local variable (to 0) to suppress compiler warning. * mark_rts.c (GC_add_roots_inner): Ditto (for "old" variable). * alloc.c (GC_RATE, MAX_PRIOR_ATTEMPTS): Guard with "ifndef". * include/private/gc_priv.h (clock, GC_stop_world, GC_start_world, GC_acquire_mark_lock, GC_release_mark_lock, GC_notify_all_builder, GC_wait_for_reclaim, GC_notify_all_marker, GC_wait_marker): Replace K&R-style function prototypes with ANSI C one. * include/private/gc_priv.h (ABORT): Define as DebugBreak() for Win32/WinCE if SMALL_CONFIG (the same as in GC_abort()). * include/private/gc_priv.h (ROUNDED_UP_WORDS, abs): Remove unused macros. * include/private/gc_priv.h (GC_noop): Declare for Borland C the same as for Watcom. * mark_rts.c (GC_push_conditional_with_exclusions): Add ARGSUSED tag.
* 2009-05-07 Hans Boehm <Hans.Boehm@hp.com> and Mark Siblyhboehm2011-07-261-1/+4
| | | | | * mach_dep.c: Don't use __builtin_unwind_init for register state on PowerPC/Darwin.
* 2008-10-27 Hans Boehm <Hans.Boehm@hp.com> (Really Rex Dieter andhboehm2011-07-261-0/+4
| | | | | | | Petr Krajca) * mach_dep.c (NO_GETCONTEXT): Define for sparc linux. * configure.ac: Define mach_dep for sparc-linux. * configure: Regenerate.
* 2008-10-21 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)hboehm2011-07-261-1/+1
| | | | | | | | * include/private/gc_locks.h, include/private/gc_pmark.h, include/private/gc_priv.h, include/private/gcconfig.h, mach_dep.c, mark_rts.c, misc.c, os_dep.c, pthread_stop_world.c, pthread_support.c, thread_local_alloc.c, typd_mlc.c, win32_threads.c: Fix comments.
* 2008-07-21 Hans Boehm <Hans.Boehm@hp.com>hboehm2011-07-261-2/+6
| | | | | | * Makefile.direct, mach_dep.c: Add support for NO_GETCONTEXT. * mach_dep.c: Include signal.h. * gc_priv.h: Factor out INLINE declaration.
* 2008-07-03 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Thiemo Seufer)hboehm2011-07-261-2/+3
| | | | | | | * include/private/gcconfig.h: Update MIPS/LINUX config. * doc/gcdescr.html: Fix typo. * mach_dep.c (GC_with_callee_saves_pushed): Don't rely on getcontext for MIPS/LINUX.
* 2007-08-14 Hans Boehm <Hans.Boehm@hp.com> (really mostly Samuel Thibault)hboehm2011-07-261-1/+4
| | | | | | | | * dbg_mlc.c: Use random() on all glibc systems. * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() on HURD. Add comment. * pthread_stop_world.c (GC_suspend_handler, GC_stop_init): Accomodate systems without SA_SIGINFO.
* 2007-07-02 Hans Boehm <Hans.Boehm@hp.com>hboehm2011-07-261-2/+4
| | | | | * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() on ARM/Linux. Check getcontext() return value.
* 2007-06-06 Hans Boehm <Hans.Boehm@hp.com>hboehm2011-07-261-2/+1
| | | | | | | | | | | | | | | | | | | * Makefile.am, Makefile.direct: Add NT_X64_STATIC_THREADS_MAKEFILE. * Makefile.in: Regenerate. * NT_X64_STATIC_THREADS_MAKEFILE: Fix warning flags. * allochblk.c, alloc.c, blacklst.c, dbg_malc.c, dyn_load.c, finalize.c, headers.c, mach_dep.c, malloc.c, mark.c, misc.c, obj_map.c, os_dep.c, ptr_chck.c, reclaim.c, typd_mlc.c, win32_threads.c, cord/de_win.c, include/gc_mark.h, include/private/gc_hdrs.h, include/private/gc_pmark.h, include/private/gc_priv.h, tests/test_cpp.cc: Replace old style function declarations. Clean up integral types. Remove register declarations. The change in malloc.c and the "int descr" declaration in mark.c are the most likely to have been real bugs outside of win64. * msvc_dbg.c: Disable on win64. * win32_threads.c: Add AMD64 support. * include/gc.h: no backtrace on AMD64 for now.
* 2006-03-18 Hans Boehm <Hans.Boehm@hp.com>hboehm2011-07-261-38/+0
| | | | | * mach_dep.c: Remove x86 assembly code to allow thread support. * doc/README.win32: add cygwin threads reminder.
* 2006-03-12 Hans Boehm <Hans.Boehm@hp.com>hboehm2011-07-261-1/+4
| | | | | | * include/private/gcconfig.h: Dont use USE_ASM_PUSH_REGS on Darwin. * thread_loal_alloc.c: Avoid empty macro arg. * mach_dep.c: Avoid getcontext on Darwin.
* gc7.0alpha5 tarball importgc7_0alpha5Ivan Maidanski2011-07-261-78/+2
|
* gc7.0alpha4 tarball importgc7_0alpha4Ivan Maidanski2011-07-261-2/+2
|
* gc7.0alpha2 tarball importgc7_0alpha2Ivan Maidanski2011-07-261-320/+77
|
* gc7.0alpha1 tarball importgc7_0alpha1Ivan Maidanski2011-07-261-10/+5
|
* gc6.4 tarball importgc6_4Ivan Maidanski2011-07-261-1/+1
|
* gc6.3alpha4 tarball importgc6_3alpha4Ivan Maidanski2011-07-261-0/+9
|
* gc6.2 tarball importgc6_2Ivan Maidanski2011-07-261-18/+28
|
* gc6.1 tarball importgc6_1Ivan Maidanski2011-07-261-17/+0
|
* gc6.1alpha4 tarball importgc6_1alpha4Ivan Maidanski2011-07-261-10/+27
|
* gc6.0 tarball importgc6_0Ivan Maidanski2011-07-261-29/+93
|
* gc5.3 tarball importgc5_3Ivan Maidanski2011-07-261-16/+89
|
* gc5.0alpha3 tarball importgc5_0alpha3Ivan Maidanski2011-07-261-5/+29
|
* gc4.14 tarball importgc4_14Ivan Maidanski2011-07-261-14/+18
|
* gc4.13 tarball importgc4_13Ivan Maidanski2011-07-261-3/+8
|
* gc4.12 tarball importgc4_12Ivan Maidanski2011-07-261-2/+4
|
* gc4.11 tarball importgc4_11Ivan Maidanski2011-07-261-3/+6
|
* gc4.8 tarball importgc4_8Ivan Maidanski2011-07-261-40/+116
|
* gc4.1 tarball importgc4_1Ivan Maidanski2011-07-261-0/+330