platform/upstream/libgc.git
12 years ago2009-11-05 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 5 Nov 2009 17:19:06 +0000 (17:19 +0000)]
2009-11-05  Ivan Maidanski <ivmai@mail.ru>

* win32_threads.c (GC_please_stop): If DllMain-based thread
registration is not compiled in then define GC_please_stop as
a non-volatile variable for assertion only.
* win32_threads.c (GC_stop_world): Set and clear only if defined.
* win32_threads.c (GC_stop_world): Add the comment for GC_printf()
usage (while holding GC_write_cs).
* win32_threads.c (GC_delete_gc_thread): Ditto.
* os_depc.c (GC_remove_protection): Ditto.

12 years ago2009-11-05 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 5 Nov 2009 15:44:07 +0000 (15:44 +0000)]
2009-11-05  Ivan Maidanski <ivmai@mail.ru>

* pthread_support.c (GC_inner_start_routine): Join 3 sequential
GC_printf() calls into a single one (for DEBUG_THREADS).

12 years ago2009-11-05 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 5 Nov 2009 12:35:44 +0000 (12:35 +0000)]
2009-11-05  Ivan Maidanski <ivmai@mail.ru>

* include/private/gc_priv.h (GC_total_stacksize): New variable
declaration (only if THREADS).
* alloc.c (GC_total_stacksize): New variable (only if THREADS).
* alloc.c (min_bytes_allocd): Calculate stack_size using
GC_stackbottom only in the single-threaded case; otherwise use
GC_total_stacksize; print GC_total_stacksize value if
DEBUG_THREADS.
* darwin_stop_world.c (GC_push_all_stacks): Use "%p" printf type
specifier for lo/hi values (instead of "%lx").
* darwin_stop_world.c (GC_push_all_stacks): Use
GC_push_all_stack_frames() instead of GC_push_all_stack().
* darwin_stop_world.c (GC_push_all_stacks): Recalculate
GC_total_stacksize value.
* pthread_stop_world.c (GC_push_all_stacks): Ditto.
* win32_threads.c (GC_push_all_stacks): Ditto.
* win32_threads.c (GC_push_stack_for): Pass "me" argument; return
stack size; don't check for non-zero value of thread->stack_base.
* win32_threads.c (GC_push_all_stacks): Don't call
GC_push_stack_for() and don't check for "t->id == me" if
thread->stack_base is zero.

12 years ago2009-11-05 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 5 Nov 2009 11:58:23 +0000 (11:58 +0000)]
2009-11-05  Ivan Maidanski <ivmai@mail.ru>

* dyn_load.c (GC_dump_meminfo): Prefix "%lx" printf type specifier
with "0x".
* os_dep.c (PROTECT): Ditto.
* win32_threads.c (GC_mark_thread_local_free_lists): Cast p->id to
int (to match printf type specifier).

12 years ago2009-11-05 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 5 Nov 2009 08:12:27 +0000 (08:12 +0000)]
2009-11-05  Ivan Maidanski <ivmai@mail.ru>

* tests/test.c (check_heap_stats): Take into account the unmapped
memory size when checking for "Unexpected heap growth"; remove
FIXME.

12 years ago2009-11-03 Hans Boehm <Hans.Boehm@hp.com>
hboehm [Tue, 3 Nov 2009 22:06:30 +0000 (22:06 +0000)]
2009-11-03  Hans Boehm <Hans.Boehm@hp.com>

        * alloc.c: Revert last change.

12 years ago2009-11-02 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 2 Nov 2009 17:46:29 +0000 (17:46 +0000)]
2009-11-02  Ivan Maidanski <ivmai@mail.ru>

* include/private/gcconfig.h (STACKBOTTOM): Add a presence check
for eCos/NOSYS.
* misc.c (GC_write): Comment out _Jv_diag_write() call (since no
longer defined in GCJ).

12 years ago2009-11-02 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 2 Nov 2009 07:43:54 +0000 (07:43 +0000)]
2009-11-02  Ivan Maidanski <ivmai@mail.ru>

* os_dep.c (brk): Rename to ecos_gc_brk.

12 years ago2009-11-01 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sun, 1 Nov 2009 09:44:56 +0000 (09:44 +0000)]
2009-11-01  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (min_bytes_allocd): Use GC_stackbottom value to compute
stack_size even if THREADS.
* doc/README.macros (DEBUG_THREADS): Document.
* pthread_support.c (DEBUG_THREADS): Remove the commented out
definition.
* win32_threads.c (DEBUG_WIN32_THREADS): Remove duplicate
definition.
* win32_threads.c: Include errno.h (except for WinCE).
* win32_threads.c (GC_win32_start_inner): Copy "start" and "param"
to local variables, and free "arg" parameter before "start"
invocation.
* win32_threads.c (GC_beginthreadex): Set errno to EAGAIN on error
(instead of calling SetLastError(ERROR_NOT_ENOUGH_MEMORY)).
* win32_threads.c (GC_beginthreadex): Return 0 on error (instead
of -1).

12 years ago2009-10-23 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 23 Oct 2009 10:23:41 +0000 (10:23 +0000)]
2009-10-23  Ivan Maidanski <ivmai@mail.ru>

* darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
Use GC_INNER for the function definition.
* include/private/darwin_stop_world.h
(GC_darwin_register_mach_handler_thread): Remove the prototype.
* include/private/darwin_stop_world.h: Add copyright header.
* os_dep.c (GC_darwin_register_mach_handler_thread): Use GC_INNER
for the function prototype.
* include/private/gc_priv.h (NDEBUG): Explicitly define if
NO_DEBUGGING and not GC_ASSERTIONS (before the standard headers
inclusion).

12 years ago2009-10-22 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 22 Oct 2009 20:26:19 +0000 (20:26 +0000)]
2009-10-22  Ivan Maidanski <ivmai@mail.ru>

* include/private/gcconfig.h: Move DebugBreak() workaround (for
x86mingw32ce toolchain) to gc_priv.h (after windows.h inclusion).

12 years ago2009-10-22 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 22 Oct 2009 17:52:36 +0000 (17:52 +0000)]
2009-10-22  Ivan Maidanski <ivmai@mail.ru>

* 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.

12 years ago2009-10-22 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 22 Oct 2009 15:00:59 +0000 (15:00 +0000)]
2009-10-22  Ivan Maidanski <ivmai@mail.ru>

* 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.

12 years ago2009-10-21 Ivan Maidanski <ivmai@mail.ru>
ivmai [Wed, 21 Oct 2009 09:33:39 +0000 (09:33 +0000)]
2009-10-21  Ivan Maidanski <ivmai@mail.ru>

* 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.

12 years ago2009-10-20 Ivan Maidanski <ivmai@mail.ru> (really mostly OpenBSD contributors)
ivmai [Tue, 20 Oct 2009 21:27:25 +0000 (21:27 +0000)]
2009-10-20  Ivan Maidanski <ivmai@mail.ru> (really mostly OpenBSD contributors)

* 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.

12 years ago2009-10-20 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
ivmai [Tue, 20 Oct 2009 21:21:16 +0000 (21:21 +0000)]
2009-10-20  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)

* dyn_load.c: Move the inclusion of private/gc_priv.h below
definition of a feature macro (_GNU_SOURCE).

12 years ago2009-10-20 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 20 Oct 2009 13:34:26 +0000 (13:34 +0000)]
2009-10-20  Ivan Maidanski <ivmai@mail.ru>

* include/gc.h (REVEAL_POINTER): Remove redundant parentheses.
* include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): New macros
(only if GC_I_HIDE_POINTERS).
* backgraph.c (GET_OH_BG_PTR): Prefix REVEAL_POINTER() with "GC_".
* dbg_mlc.c (GC_get_back_ptr_info): Ditto.
* finalize.c (GC_grow_table, GC_dump_finalization, GC_finalize,
GC_enqueue_all_finalizers): Ditto.
* backgraph.c (SET_OH_BG_PTR): Prefix HIDE_POINTER() with "GC_".
* finalize.c (GC_general_register_disappearing_link,
GC_unregister_disappearing_link, GC_register_finalizer_inner,
GC_finalize): Ditto.
* include/private/dbg_mlc.h (HIDE_BACK_PTR): Ditto.
* include/private/dbg_mlc.h (GC_I_HIDE_POINTERS): Define instead
of I_HIDE_POINTERS.
* include/private/gc_priv.h (GC_I_HIDE_POINTERS): Ditto.
* include/gc.h (_GC_H): Strip leading underscore.
* include/gc_backptr.h (_GC_H): Ditto.
* include/gc_gcj.h (_GC_H): Ditto.
* include/gc_mark.h (_GC_H): Ditto.
* include/gc_typed.h (_GC_TYPED_H, _GC_H): Ditto.
* include/javaxfc.h (_GC_H): Ditto.
* include/new_gc_alloc.h (__GC_SPECIALIZE): Ditto.
* include/private/dbg_mlc.h (_GC_H): Ditto.
* include/private/gc_priv.h (_GC_H): Ditto.
* include/gc_backptr.h: Reformat the code (adjust indentation,
comment out function parameter names).
* include/gc_gcj.h: Ditto.
* include/gc_mark.h: Ditto.
* include/gc_typed.h: Ditto.
* include/javaxfc.h: Ditto.
* include/private/dbg_mlc.h: Ditto.
* include/private/gc_priv.h: Ditto.

12 years ago2009-10-19 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 19 Oct 2009 17:08:27 +0000 (17:08 +0000)]
2009-10-19  Ivan Maidanski <ivmai@mail.ru>

* gc_cpp.cc: Include "gc_cpp.h" instead of <gc_cpp.h>.

12 years ago2009-10-19 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 19 Oct 2009 15:06:58 +0000 (15:06 +0000)]
2009-10-19  Ivan Maidanski <ivmai@mail.ru>

* 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.

12 years ago2009-10-19 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 19 Oct 2009 14:17:03 +0000 (14:17 +0000)]
2009-10-19  Ivan Maidanski <ivmai@mail.ru>

* include/private/gc_priv.h (GC_bytes_allocd, GC_objfreelist,
GC_aobjfreelist): Replace GC_EXTERN to extern for SEPARATE_GLOBALS
case (since they are not defined inside GC at present).
* include/private/gc_priv.h (GC_objects_are_marked): Remove the
declaration (since made static).
* mark.c (GC_objects_are_marked): Define as STATIC.
* win32_threads.c (GC_thr_initialized, GC_in_thread_creation):
Ditto.
* mark.c (GC_N_KINDS_INITIAL_VALUE): New macro (defined and used
to initialize GC_n_kinds).
* win32_threads.c (start_mark_threads): Adjust the comment.

12 years ago2009-10-19 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 19 Oct 2009 11:32:44 +0000 (11:32 +0000)]
2009-10-19  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_notify_full_gc): Use GC_INLINE for a tiny static
function.
* backgraph.c (pop_in_progress, GC_apply_to_each_object): Ditto.
* mark_rts.c (add_roots_to_index): Ditto.

12 years ago2009-10-19 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 19 Oct 2009 10:56:20 +0000 (10:56 +0000)]
2009-10-19  Ivan Maidanski <ivmai@mail.ru>

* extra/gc.c: New file.
* Makefile.am (EXTRA_DIST): Add "extra/gc.c".
* configure: Regenerate.
* Makefile.in: Ditto.

12 years ago2009-10-19 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 19 Oct 2009 08:44:47 +0000 (08:44 +0000)]
2009-10-19  Ivan Maidanski <ivmai@mail.ru>

* misc.c (GC_log): Remove the declaration; move the definition (to
the place where it is used); make STATIC.
* misc.c (GC_init): Use GC_err_printf() instead of GC_log_printf()
to print open log failure.
* misc.c (GC_write): Don't abort on open log failure if the GC is
compiled with GC_PRINT_VERBOSE_STATS (useful for WinCE).

12 years ago2009-10-19 Ivan Maidanski <ivmai@mail.ru> (really Andreas Tobler)
ivmai [Mon, 19 Oct 2009 04:47:24 +0000 (04:47 +0000)]
2009-10-19  Ivan Maidanski <ivmai@mail.ru> (really Andreas Tobler)

* include/private/gcconfig.h (USE_MMAP): Guard with ifndef.

12 years ago2009-10-18 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sun, 18 Oct 2009 10:47:44 +0000 (10:47 +0000)]
2009-10-18  Ivan Maidanski <ivmai@mail.ru>

* allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Move
the variable declaration to gc_priv.h.
* alloc.c (GC_bytes_found, GC_unmap_threshold,
GC_force_unmap_on_gcollect): Ditto.
* dyn_load.c (GC_no_win32_dlls, GC_wnt): Ditto.
* finalize.c (GC_fail_count): Ditto.
* include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Ditto.
* include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
GC_mark_stack_too_small, GC_mark_state): Ditto.
* include/private/pthread_support.h (GC_threads,
GC_thr_initialized, GC_in_thread_creation): Ditto.
* mallocx.c (GC_bytes_found): Ditto.
* mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Ditto.
* misc.c (GC_unmap_threshold): Ditto.
* os_dep.c (GC_unmap_threshold): 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_fault_handler_lock, GC_write_cs,
GC_dont_query_stack_min, GC_markers, GC_wnt): Ditto.
* include/private/gc_priv.h (GC_EXTERN): New macro (used mostly as
a tag for now); defined after "gcconfig.h" inclusion.
* include/private/gc_priv.h: Use GC_EXTERN instead of "extern"
keyword for most global variables.
* alloc.c (GC_copyright): Add the comment about the symbol
visibility.
* finalize.c (GC_fo_entries): Ditto.
* include/private/gc_priv.h (GC_print_stats): Ditto.
* misc.c (GC_quiet): Ditto.
* mallocx.c (GC_bytes_allocd_tmp): Make the volatile variable
STATIC.
* pthread_support.c (GC_threads): Add explicit zero initializer
(to make the variable definition differ from the declaration).

12 years ago2009-10-18 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sun, 18 Oct 2009 08:46:08 +0000 (08:46 +0000)]
2009-10-18  Ivan Maidanski <ivmai@mail.ru>

* backgraph.c (GC_quiet): Remove the declaration (not needed
anymore since gc_priv.h is always included).
* checksums.c (GC_quiet): Ditto.
* gcj_mlc.c (GC_quiet): Ditto.
* headers.c (GC_hdr_cache_hits, GC_hdr_cache_misses): Add the
comment.
* include/private/gc_hdrs.h (GC_hdr_cache_hits,
GC_hdr_cache_misses): Ditto.
* mark.c (GC_first_nonempty): Make the volatile variable STATIC.
* pthread_stop_world.c (GC_stop_count, GC_world_is_stopped):
Ditto.
* win32_threads.c (GC_please_stop, GC_max_thread_index,
GC_mark_mutex_waitcnt): Ditto.

12 years ago2009-10-18 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sun, 18 Oct 2009 05:21:39 +0000 (05:21 +0000)]
2009-10-18  Ivan Maidanski <ivmai@mail.ru>

* pthread_support.c (GC_USE_LD_WRAP): Fix a typo (swapped 'L' and
'D') in the name.

12 years ago2009-10-17 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 17 Oct 2009 21:54:30 +0000 (21:54 +0000)]
2009-10-17  Ivan Maidanski <ivmai@mail.ru>

* gc_dlopen.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Define if dlopen
redirection is turned off; turn it on later when dlopen real
symbol is no longer needed (according to the comment and the same
as in dyn_load.c).
* gc_dlopen.c (WRAP_FUNC, REAL_FUNC): Rename to WRAP_DLFUNC and
REAL_DLFUNC, respectively (to have unique names since the
definitions may differ from that of the similar ones in
pthread_support.c).
* mark.c (source): Undefine the macro when no longer needed.
* os_dep.c (handler): Rename the type to GC_fault_handler_t (to
have the unique name across the project).
* os_dep.c (STAT_BUF_SIZE, STAT_READ); Guard with ifndef; add the
comment.
* pthread_support.c (STAT_BUF_SIZE, STAT_READ): Ditto.
* os_dep.c (sbrk): Undo sbrk() redirection (for ECOS) when no
longer needed.

12 years ago2009-10-17 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 17 Oct 2009 21:22:12 +0000 (21:22 +0000)]
2009-10-17  Ivan Maidanski <ivmai@mail.ru>

* pthread_stop_world.c (pthread_sigmask): Undefine before using
in GC_print_sig_mask() (only if DEBUG_THREADS); add the comment.
* win32_threads.c (dlopen, _beginthread): Don't undefine (since
neither redirected nor used here).
* win32_threads.c (GC_Thread_Rep): Rename "table_management" to
"tm" for short; remove "tm_" prefix.
* win32_threads.c (in_use, next): Don't define the macros; use
tm.in_use and tm.next fields, respectively (to ease debugging).
* win32_threads.c (HASH): Rename to PTHREAD_MAP_HASH (to have
unique name across the project).

12 years ago2009-10-17 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 17 Oct 2009 21:00:46 +0000 (21:00 +0000)]
2009-10-17  Ivan Maidanski <ivmai@mail.ru>

* include/private/gc_priv.h (I_HIDE_POINTERS): Define before gc.h
inclusion.
* include/private/gc_pmark.h (I_HIDE_POINTERS): Define if gc.h is
not included yet.
* finalize.c (I_HIDE_POINTERS): Don't define.
* include/private/dbg_mlc.h (I_HIDE_POINTERS): Ditto.
* misc.c (I_HIDE_POINTERS): Ditto.
* include/private/dbg_mlc.h (HIDE_POINTER, REVEAL_POINTER,
GC_hidden_pointer): Don't define if HIDE_POINTER is undefined.
* include/private/gc_pmark.h: Remove the comment about gc_priv.h
inclusion order.

12 years ago2009-10-17 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 17 Oct 2009 20:40:55 +0000 (20:40 +0000)]
2009-10-17  Ivan Maidanski <ivmai@mail.ru>

* dyn_load.c: Include gc_priv.h before using configuration
information (MACOS).
* dyn_load.c (GC_must_restore_redefined_dlopen): Rename to
GC_MUST_RESTORE_REDEFINED_DLOPEN.

12 years ago2009-10-17 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 17 Oct 2009 20:12:19 +0000 (20:12 +0000)]
2009-10-17  Ivan Maidanski <ivmai@mail.ru>

* backgraph.c (SET_OH_BG_PTR): Place outermost parenthesis
properly.
* darwin_stop_world.c: Replace "if DEBUG_THREADS" with
"ifdef DEBUG_THREADS".
* pthread_stop_world.c: Ditto.
* pthread_support.c: Ditto.
* include/gc_inline.h: Guard with GC_INLINE_H.

12 years ago2009-10-17 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 17 Oct 2009 11:18:17 +0000 (11:18 +0000)]
2009-10-17  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_copyright): Define as const.
* alloc.c (GC_collect_at_heapsize): Replace "static" with "STATIC"
(since the name starts with "GC_" prefix).
* dbg_mlc.c (GC_describe_type_fns): Ditto.
* dyn_load.c (GC_FirstDLOpenedLinkMap,
GC_register_dynlib_callback, GC_dyld_sections,
GC_dyld_name_for_hdr, GC_dyld_image_add, GC_dyld_image_remove):
Ditto.
* malloc.c (GC_libpthread_start, GC_libpthread_end,
GC_libld_start, GC_libld_end): Ditto.
* mark_rts.c (GC_remove_root_at_pos, GC_rebuild_root_index):
Ditto.
* os_dep.c (GC_gww_read_dirty, GC_gww_page_was_dirty,
GC_gww_page_was_ever_dirty, GC_mprotect_thread_notify,
GC_mprotect_thread_reply, GC_mprotect_thread, GC_darwin_sigbus,
GC_forward_exception): Ditto.
* pthread_support.c (GC_syms_initialized): Ditto.
* typd_mlc.c (GC_push_typed_structures_proc): Ditto.
* win32_threads.c (GC_win32_dll_threads,
GC_register_my_thread_inner, GC_lookup_pthread, GC_get_stack_min,
GC_waitForSingleObjectInfinite): Ditto.
* darwin_stop_world.c (GC_use_mach_handler_thread,
GC_use_mach_handler_thread, GC_mach_threads_count): Replace
"static" with "STATIC" and add zero initializer.
* os_dep.c (GC_task_self, GC_ports, GC_mprotect_state,
GC_sigbus_count): Ditto.
* headers.c (free_hdr): Replace "static" with GC_INLINE.
* misc.c (GC_tmp): Rename static variable to fwrite_gc_res.
* os_dep.c (memory): Rename static variable to ecos_gc_memory.
* os_dep.c (async_set_pht_entry_from_index): Make static (for
MPROTECT_VDB case).
* pthread_support.c (GC_real_pthread_create,
GC_real_pthread_sigmask, GC_real_pthread_join,
GC_real_pthread_detach, GC_init_real_syms): Use REAL_FUNC() macro
for static GC_real_XXX symbols.
* win32_threads.c (GC_may_be_in_stack): Remove "GC_" prefix.

12 years ago2009-10-17 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 17 Oct 2009 10:12:52 +0000 (10:12 +0000)]
2009-10-17  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_never_stop_func, GC_check_fl_marks,
GC_finish_collection): Reformat the code (make opening bracket
style uniform across the file).
* allchblk.c (GC_allochblk): Ditto.
* backgraph.c (add_edge): Ditto.
* dbg_mlc.c (GC_marked_for_finalization): Ditto.
* dyn_load.c (GC_register_dynamic_libraries, GC_init_dyld): Ditto.
* finalize.c (GC_null_finalize_mark_proc): Ditto.
* gc_dlopen.c (GC_dlopen): Ditto.
* mark.c (GC_push_marked1, GC_push_marked2, GC_push_marked4):
Ditto.
* misc.c (looping_handler, GC_call_with_gc_active,
GC_do_blocking_inner, GC_do_blocking): Ditto.
* os_dep.c (GC_get_main_stack_base, GC_read_dirty): Ditto.
* pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
GC_pthread_join, GC_pthread_detach, GC_check_tls,
GC_do_blocking_inner, GC_call_with_gc_active): Ditto.
* reclaim.c (GC_reclaim_clear, GC_reclaim_block,
GC_print_free_list): Ditto.
* os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty,
GC_remove_protection): Reformat the code (wrap long lines).

12 years ago2009-10-16 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 16 Oct 2009 06:41:03 +0000 (06:41 +0000)]
2009-10-16  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_finish_collection): Replace getenv() with GETENV().
* dyn_load.c (GC_init_dyld): Ditto.
* os_dep.c (GC_print_callers): Ditto.
* dyn_load.c (GC_dyld_name_for_hdr): Cast _dyld_get_image_name()
result (since it's always of "struct mach_header" type).
* dyn_load.c (GC_init_dyld): Cast GC_dyld_image_add and
GC_dyld_image_remove (to always have the first argument of
"struct mach_header" pointer type).

12 years ago2009-10-16 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
ivmai [Fri, 16 Oct 2009 06:25:28 +0000 (06:25 +0000)]
2009-10-16  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)

* configure.ac: Add threads support for OpenBSD case (threads may
not work correctly for it).
* configure: Regenerate.

12 years ago2009-10-15 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
ivmai [Thu, 15 Oct 2009 19:39:38 +0000 (19:39 +0000)]
2009-10-15  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)

* acinclude.m4: Rename to m4/gc_set_version.m4.
* aclocal.m4: Regenerate.
* configure: Ditto.
* Makefile.in: Ditto.
* m4/libtool.m4: Delete the file.
* m4/lt~obsolete.m4: Ditto.
* m4/ltoptions.m4: Ditto.
* m4/ltsugar.m4: Ditto.
* m4/ltversion.m4: Ditto.

12 years ago2009-10-15 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 15 Oct 2009 16:41:07 +0000 (16:41 +0000)]
2009-10-15  Ivan Maidanski <ivmai@mail.ru>

* include/private/gcconfig.h: Define DebugBreak() as _exit(-1) for
x86mingw32ce toolchain to workaround the incorrect DebugBreak()
declaration in winbase.h (the workaround would turn into a no-op
when DebugBreak() will be defined as a macro in the toolchain).

12 years ago2009-10-15 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 15 Oct 2009 12:49:40 +0000 (12:49 +0000)]
2009-10-15  Ivan Maidanski <ivmai@mail.ru>

* include/private/gcconfig.h: Recognize __i386__ if WinCE (for
x86mingw32ce toolchain).
* include/private/gcconfig.h (NO_GETENV): Don't define for CeGCC
toolchain (or if already defined).
* include/private/gcconfig.h (NO_GETENV_WIN32): New macro (always
defined for WinCE or if NO_GETENV is defined).
* misc.c (GC_CreateLogFile): Use NO_GETENV_WIN32 macro instead of
NO_GETENV one.

12 years ago2009-10-15 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
ivmai [Thu, 15 Oct 2009 06:25:01 +0000 (06:25 +0000)]
2009-10-15  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)

* configure.ac: Add AC_CONFIG_MACRO_DIR([m4]).
* Makefile.am: Add "ACLOCAL_AMFLAGS = -I m4".
* libtool.m4: Remove.
* aclocal.m4: Regenerate.
* configure: Ditto.
* Makefile.in: Ditto.
* m4/libtool.m4: New file (generated).
* m4/lt~obsolete.m4: Ditto.
* m4/ltoptions.m4: Ditto.
* m4/ltsugar.m4: Ditto.
* m4/ltversion.m4: Ditto.

12 years ago2009-10-10 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 10 Oct 2009 07:45:57 +0000 (07:45 +0000)]
2009-10-10  Ivan Maidanski <ivmai@mail.ru>

* include/gc.h (GC_UNDERSCORE_STDCALL): Recognize new macro;
prefix GC_CreateThread and GC_ExitThread with '_' if defined.
* doc/README.macros (GC_UNDERSCORE_STDCALL): Document.

12 years ago2009-10-09 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 9 Oct 2009 17:03:35 +0000 (17:03 +0000)]
2009-10-09  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_collect_or_expand): Add "retry" argument; add the
comments; don't use "default" stop_func on a retry if
GC_dont_expand.
* alloc.c (GC_collect_or_expand): Reformat the code (make the
indentation style uniform across the function).
* alloc.c (GC_allocobj): Pass "retry" argument to
GC_collect_or_expand().
* malloc.c (GC_alloc_large): Ditto.
* include/private/gc_priv.h (GC_collect_or_expand): Move the
declaration to malloc.c; add "retry" argument.

12 years ago2009-10-09 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 9 Oct 2009 07:04:46 +0000 (07:04 +0000)]
2009-10-09  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_start_call_back): Move the variable definition from
misc.c.
* include/private/gc_priv.h (GC_start_call_back): Remove the
declaration.
* alloc.c (GC_notify_full_gc): Remove unnecessary cast of 0.
* alloc.c (GC_try_to_collect_inner): Also call stop_func at the
beginning of the function.
* include/gc.h (GC_try_to_collect): Refine the comment about
stop_func.

12 years ago2009-10-08 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 8 Oct 2009 08:24:13 +0000 (08:24 +0000)]
2009-10-08  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_default_stop_func, GC_try_to_collect_general,
GC_gcollect): Add the comment.
* alloc.c (GC_try_to_collect_general): Move the assertion on
stop_func != 0 to GC_try_to_collect().
* alloc.c (GC_try_to_collect_general): If stop_func == 0 then use
GC_default_stop_func instead (holding the lock).
* alloc.c (GC_gcollect): Pass 0 as stop_func instead of
GC_default_stop_func (to prevent data races).

12 years ago2009-10-08 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 8 Oct 2009 07:17:23 +0000 (07:17 +0000)]
2009-10-08  Ivan Maidanski <ivmai@mail.ru>

* Makefile.direct: Move "define arguments" documentation to
doc/README.macros; add reference to doc/README.macros.
* Makefile.dj: Change the documentation reference to
doc/README.macros.
* README.QUICK: Ditto.
* configure.ac: Ditto.
* allchblk.c: Remove unnecessary "-D" from the comment.
* doc/README.macros: Ditto.
* README.environment: Ditto.
* include/gc.h: Ditto.
* include/gc_inline.h: Ditto.
* include/private/gcconfig.h: Ditto.
* README.QUICK: Fix a typo.
* README.QUICK: Expand all tabs to spaces.
* configure: Regenerate.
* include/private/config.h.in: Ditto.

12 years ago2009-10-07 Ivan Maidanski <ivmai@mail.ru>
ivmai [Wed, 7 Oct 2009 15:22:30 +0000 (15:22 +0000)]
2009-10-07  Ivan Maidanski <ivmai@mail.ru>

* misc.c (GC_CreateLogFile): Use FILE_ATTRIBUTE_NORMAL for
CreateFile(); don't immediately flush every write if very verbose.

12 years ago2009-10-07 Ivan Maidanski <ivmai@mail.ru>
ivmai [Wed, 7 Oct 2009 12:22:07 +0000 (12:22 +0000)]
2009-10-07  Ivan Maidanski <ivmai@mail.ru>

* doc/README.win32: Replace ".exe.log" to ".gc.log".
* doc/README.win64: Ditto.
* doc/README.win64: Fix a typo.
* misc.c (GC_CreateLogFile): Strip executable file extension for
the log file; use ".gc.log" extension (instead of ".log").

12 years ago2009-10-07 Ivan Maidanski <ivmai@mail.ru>
ivmai [Wed, 7 Oct 2009 06:42:34 +0000 (06:42 +0000)]
2009-10-07  Ivan Maidanski <ivmai@mail.ru>

* include/gc_config_macros.h: Avoid the redefinition of
GC_xxx_THREADS macros.

12 years ago2009-10-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 6 Oct 2009 16:29:55 +0000 (16:29 +0000)]
2009-10-06  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_try_to_collect_general): Change the type of "result"
local variable to GC_bool.

12 years ago2009-10-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 6 Oct 2009 16:16:01 +0000 (16:16 +0000)]
2009-10-06  Ivan Maidanski <ivmai@mail.ru>

* include/gc_config_macros.h: Use old behavior for FreeBSD and
NetBSD platform detection code (check that other GC_xxx_THREADS
are undefined); add FIXME.

12 years ago2009-10-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 6 Oct 2009 15:38:52 +0000 (15:38 +0000)]
2009-10-06  Ivan Maidanski <ivmai@mail.ru>

* include/gc_config_macros.h: Rearrange the platform detection
code (GC_WIN32_PTHREADS implies GC_WIN32_THREADS; define
GC_THREADS first if GC_XXX_THREADS already set; define proper
GC_XXX_THREADS if GC_THREADS; define GC_PTHREADS in a single
place; define _REENTRANT if posix threads except for Win32).
* include/gc_config_macros.h: Reformat the code (make the
indentation style uniform across the file).

12 years ago2009-10-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 6 Oct 2009 12:50:34 +0000 (12:50 +0000)]
2009-10-06  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_try_to_collect_general): New function (move the code
from GC_try_to_collect, pass force_unmap argument).
* alloc.c (GC_try_to_collect, GC_gcollect): Call
GC_try_to_collect_general().
* alloc.c (GC_gcollect_and_unmap): New public function.
* include/gc.h (GC_gcollect_and_unmap): New function declaration.
* tests/test.c (window_proc): Call GC_gcollect_and_unmap() on
WM_HIBERNATE event (instead of GC_set_force_unmap_on_gcollect()
and GC_gcollect()).

12 years ago2009-10-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 6 Oct 2009 10:52:03 +0000 (10:52 +0000)]
2009-10-06  Ivan Maidanski <ivmai@mail.ru>

* include/gc.h (GC_allow_register_threads, GC_register_my_thread,
GC_unregister_my_thread, GC_malloc_many): Refine the comment.
* include/gc.h (GC_malloc_many, GC_NEXT): Declare unconditionally
(that is, don't depend on GC_THREADS macro).
* include/gc.h: Don't check for __CYGWIN32__ and __CYGWIN__ along
with a check for GC_PTHREADS (since the former implies the
latter).

12 years ago2009-10-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 6 Oct 2009 08:01:01 +0000 (08:01 +0000)]
2009-10-06  Ivan Maidanski <ivmai@mail.ru>

* include/gc.h: Reformat the code (make the indentation style
uniform across the file).
* include/gc.h (GC_SOLARIS_THREADS): Don't check for.
* include/gc.h (GC_MIN, GC_MAX): Don't define.
* mallocx.c (GC_malloc_many): Add comment to #endif.

12 years ago2009-10-02 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
ivmai [Fri, 2 Oct 2009 08:29:50 +0000 (08:29 +0000)]
2009-10-02  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)

* configure.ac: Drop the subdir-objects Automake option, since
it's incompatible with picking source files from libatomic_ops.
* Makefile.in: Regenerate.

12 years ago2009-10-01 Ivan Maidanski <ivmai@mail.ru> (really mostly Andreas Tobler)
ivmai [Thu, 1 Oct 2009 21:13:37 +0000 (21:13 +0000)]
2009-10-01  Ivan Maidanski <ivmai@mail.ru> (really mostly Andreas Tobler)

* allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Add
"extern" keyword to a global variable declaration (some compilers
require it).
* alloc.c (GC_bytes_found, GC_unmap_threshold,
GC_force_unmap_on_gcollect): Ditto.
* dyn_load.c (GC_no_win32_dlls, GC_wnt): Ditto.
* finalize.c (GC_fail_count): Ditto.
* include/private/gc_hdrs.h (GC_hdr_cache_hits,
GC_hdr_cache_misses): Ditto.
* mallocx.c (GC_bytes_found): Ditto.
* mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Ditto.
* misc.c (GC_unmap_threshold): Ditto.
* os_dep.c (GC_unmap_threshold, 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_fault_handler_lock, GC_write_cs,
GC_dont_query_stack_min, GC_markers, GC_wnt): Ditto.

12 years ago2009-10-01 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 1 Oct 2009 20:04:23 +0000 (20:04 +0000)]
2009-10-01  Ivan Maidanski <ivmai@mail.ru>

* Makefile.in: Regenerate (by autoreconf -vif, deleting libtool.m4
first and using libtool-2.2, automake-1.10.2, autoconf-2.64).
* aclocal.m4: Ditto.
* config.guess: Ditto.
* config.sub: Ditto.
* configure: Ditto.
* depcomp: Ditto.
* install-sh: Ditto.
* ltmain.sh: Ditto.
* missing: Ditto.
* mkinstalldirs: Ditto.
* include/private/config.h.in: Ditto.

12 years ago2009-10-01 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 1 Oct 2009 19:23:14 +0000 (19:23 +0000)]
2009-10-01  Ivan Maidanski <ivmai@mail.ru>

* tests/huge_test.c: Define GC_IGNORE_WARN (if not defined) to
suppress misleading GC "Out of Memory!" warning printed on every
GC_MALLOC(LONG_MAX) call.
* tests/huge_test.c: Include "gc.h" instead of <gc.h>.
* tests/huge_test.c (main): Replace K&R-style function definition
with the ANSI C one.
* tests/huge_test.c: Expand all tabs to spaces.

12 years ago2009-10-01 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 1 Oct 2009 12:48:38 +0000 (12:48 +0000)]
2009-10-01  Ivan Maidanski <ivmai@mail.ru>

* dyn_load.c (GC_register_dynamic_libraries): Always use
lpMaximumApplicationAddress value for WinCE (even for old
versions).
* os_dep.c (VER_PLATFORM_WIN32_CE): Define if not in winbase.h.
* os_dep.c (GC_dont_query_stack_min): New global variable (only if
WinCE and THREADS).
* os_dep.c (GC_setpagesize): Adjust lpMaximumApplicationAddress
for WinCE (prior to version 6) if not _WIN32_WCE_EMULATION; set
GC_dont_query_stack_min for older WinCE (prior to version 5).
* win32_threads.c (GC_dont_query_stack_min): Declare.
* win32_threads.c (GC_get_stack_min): Rename the macro to
GC_wince_evaluate_stack_min for WinCE; update the comment.
* win32_threads.c (GC_push_stack_for, GC_get_next_stack): Use
GC_wince_evaluate_stack_min() instead of GC_get_stack_min() for
WinCE and don't update thread's last_stack_min value (only if
GC_dont_query_stack_min).
* win32_threads.c (GC_push_stack_for): Skip assertion for WinCE if
GC_dont_query_stack_min (since the evaluated stack_min value may
be incorrect if the stack is bigger than 64 KiB).

12 years ago2009-10-01 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 1 Oct 2009 12:22:02 +0000 (12:22 +0000)]
2009-10-01  Ivan Maidanski <ivmai@mail.ru>

* gc_dlopen.c (GC_dlopen): Add function redirector (only if
GC_USE_LD_WRAP).
* include/gc.h: Include "gc_pthread_redirects.h" even if
GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS.
* include/gc_pthread_redirects.h (GC_PTHREAD_REDIRECTS_H): Don't
define and check for (since included only from gc.h).
* include/gc_pthread_redirects.h: Declare "GC_" symbols even if
GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS.
* include/gc_pthread_redirects.h: Include signal.h only to get
sigset_t definition.

12 years ago2009-09-30 Ivan Maidanski <ivmai@mail.ru>
ivmai [Wed, 30 Sep 2009 19:05:39 +0000 (19:05 +0000)]
2009-09-30  Ivan Maidanski <ivmai@mail.ru>

* configure: Regenerate (by autoreconf -vif, deleting libtool.m4
first).
* Makefile.in: Ditto.
* aclocal.m4: Ditto.
* include/private/config.h.in: Ditto.

12 years ago2009-09-30 Ivan Maidanski <ivmai@mail.ru>
ivmai [Wed, 30 Sep 2009 18:46:40 +0000 (18:46 +0000)]
2009-09-30  Ivan Maidanski <ivmai@mail.ru>

* Makefile.direct: Remove trailing spaces at EOLn.
* Makefile.direct: Document GC_REGISTER_MEM_PRIVATE.
* mark_rts.c (GC_is_tmp_root): Define also for WinCE unless
NO_DEBUGGING (that is, replace _WIN32_WCE_EMULATION with MSWINCE).
* os_dep.c (GC_sysinfo): Remove explicit global variable
initialization to "{0}" (revert back the previous change) since it
might produce a warning.

12 years ago2009-09-30 Ivan Maidanski <ivmai@mail.ru>
ivmai [Wed, 30 Sep 2009 17:47:48 +0000 (17:47 +0000)]
2009-09-30  Ivan Maidanski <ivmai@mail.ru>

* 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.

12 years ago2009-09-30 Ivan Maidanski <ivmai@mail.ru> (really Hans Boehm)
ivmai [Wed, 30 Sep 2009 09:13:05 +0000 (09:13 +0000)]
2009-09-30  Ivan Maidanski <ivmai@mail.ru> (really Hans Boehm)

* os_dep.c (PROTECT, UNPROTECT): Use distinct ABORT messages.

12 years ago2009-09-30 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
ivmai [Wed, 30 Sep 2009 08:42:33 +0000 (08:42 +0000)]
2009-09-30  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)

* configure.ac: Rewrite the tests for external or internal
libatomic_ops.
* configure.ac: In particular, drop the symbolic links. Add option
--with-libatomic-ops for forced selection.
* Makefile.am: Adjust the path of source files from libatomic_ops
to not use the links.
* Makefile.am (libgc_la_LIBADD): Add $(ATOMIC_OPS_LIBS). This will
be empty if we use the bundled AO sources.
* configure: Regenerate.
* Makefile.in: Ditto.

12 years ago2009-09-29 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 29 Sep 2009 13:50:11 +0000 (13:50 +0000)]
2009-09-29  Ivan Maidanski <ivmai@mail.ru>

* Makefile.am: Strip version suffix for libatomic_ops directory.
* build_atomic_ops.sh: Ditto.
* build_atomic_ops.sh.cygwin: Ditto.
* configure_atomic_ops.sh: Ditto.
* Makefile.direct: Remove AO_VERSION definition; strip version
suffix for libatomic_ops directory.
* NT_STATIC_THREADS_MAKEFILE: Ditto.
* NT_X64_STATIC_THREADS_MAKEFILE: Ditto.
* NT_X64_THREADS_MAKEFILE: Ditto.
* gc.mak: Ditto.
* Makefile.in: Regenerate.

12 years ago* Moving libatomic_ops-1.2 to libatomic_ops
ivmai [Tue, 29 Sep 2009 13:41:49 +0000 (13:41 +0000)]
* Moving libatomic_ops-1.2 to libatomic_ops

12 years ago2009-09-28 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 28 Sep 2009 09:06:06 +0000 (09:06 +0000)]
2009-09-28  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_version): Add "const" keyword.
* alloc.c (GC_get_version): New public function.
* include/gc.h (GC_get_version): New function declaration; update
the comment for the GC version.

12 years ago2009-09-27 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sun, 27 Sep 2009 21:19:59 +0000 (21:19 +0000)]
2009-09-27  Ivan Maidanski <ivmai@mail.ru>

* include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Use "extern"
(for the global variable declaration) again.
* include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
GC_mark_stack_too_small, GC_mark_state): Ditto.
* include/private/gcconfig.h (GC_register_stackbottom): Ditto.
* include/private/pthread_support.h (GC_threads,
GC_thr_initialized, GC_in_thread_creation): Ditto.
* include/private/gc_priv.h: Ditto (for all global variables).

12 years ago2009-09-27 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sun, 27 Sep 2009 16:53:42 +0000 (16:53 +0000)]
2009-09-27  Ivan Maidanski <ivmai@mail.ru>

* real_malloc.c: Include private/config.h if HAVE_CONFIG_H.

12 years ago2009-09-27 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sun, 27 Sep 2009 15:06:46 +0000 (15:06 +0000)]
2009-09-27  Ivan Maidanski <ivmai@mail.ru>

* allchblk.c (GC_hblkfreelist): Define as STATIC.
* blacklst.c (GC_total_stack_black_listed): Ditto.
* include/private/gc_priv.h (GC_hblkfreelist, GC_stopped_mark,
GC_total_stack_black_listed, GC_push_stubborn_structures): Remove
declaration.
* mark_rts.c (GC_stopped_mark): Add declaration (only if
THREAD_LOCAL_ALLOC).
* allchblk.c (GC_fail_count): Move the declaration out of
GC_allochblk_nth(); remove "extern".
* alloc.c (IF_THREADS): Remove unused macro.
* alloc.c (GC_world_stopped): Define only if THREAD_LOCAL_ALLOC.
* alloc.c (GC_stopped_mark): Set GC_world_stopped value only if
THREAD_LOCAL_ALLOC.
* alloc.c (GC_bytes_found, GC_collection_in_progress,
GC_check_tls, GC_unmap_threshold, GC_force_unmap_on_gcollect):
Remove K&R-style "extern" for the declaration.
* dbg_mlc.c (GC_free_inner): Ditto.
* dyn_load.c (GC_repeat_read, GC_roots_present, GC_is_heap_base,
GC_get_next_stack, GC_no_win32_dlls, GC_wnt): Ditto.
* finalize.c (GC_fail_count): Ditto.
* include/private/gc_hdrs.h (GC_hdr_cache_hits,
GC_hdr_cache_misses): Ditto.
* include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
GC_lock, GC_collecting, GC_mark_lock_holder, GC_need_to_lock):
Ditto.
* include/private/gc_pmark.h (GC_mark_procs, GC_n_mark_procs,
GC_mark_stack_size, GC_mark_stack_limit, GC_mark_stack_top,
GC_mark_stack, GC_mark_stack_too_small, GC_mark_state): Ditto.
* include/private/gc_priv.h (GC_current_warn_proc, GC_obj_kinds,
GC_n_kinds, GC_fo_entries, GC_n_heap_sects, GC_n_memory,
GC_page_size, GC_sysinfo, GC_black_list_spacing,
GC_objects_are_marked, GC_incremental, GC_dirty_maintained,
GC_root_size, GC_debugging_started, GC_large_alloc_warn_interval,
GC_large_alloc_warn_suppressed, GC_blocked_sp,
GC_activation_frame, GC_push_other_roots,
GC_push_finalizer_structures, GC_push_thread_structures,
GC_push_typed_structures, GC_start_call_back, GC_is_initialized,
GC_check_heap, GC_print_all_smashed, GC_print_all_errors,
GC_print_heap_obj, GC_have_errors, GC_print_stats,
GC_dump_regularly, GC_backtraces, GC_print_back_height,
GC_debug_generic_malloc_inner,
GC_debug_generic_malloc_inner_ignore_off_page,
GC_fl_builder_count, GC_mark_no, GC_help_marker,
GC_setup_temporary_fault_handler, GC_reset_fault_handler): Ditto.
* include/private/gcconfig.h (GC_SysVGetDataStart,
GC_FreeBSDGetDataStart, GC_register_stackbottom,
GC_MacTemporaryNewPtr, GC_amiga_get_mem): Ditto.
* include/private/pthread_support.h (GC_threads,
GC_thr_initialized, GC_in_thread_creation): Ditto.
* malloc.c (GC_text_mapping): Ditto.
* mallocx.c (GC_bytes_found): Ditto.
* mark.c (GC_check_dirty, GC_started_thread_while_stopped): Ditto.
* mark_rts.c (GC_save_regs_ret_val): Ditto.
* misc.c (GC_clear_stack_inner, GC_init_parallel, GC_init_win32,
GC_setpagesize, GC_init_linux_data_start,
GC_set_and_save_fault_handler, GC_unmap_threshold): Ditto.
* os_dep.c (GC_unmap_threshold, GC_push_all_stacks,
GC_darwin_register_mach_handler_thread): Ditto.
* pthread_support.c (GC_markers, GC_collection_in_progress):
Ditto.
* tests/test.c (GC_amiga_free_all_mem): Ditto.
* thread_local_alloc.c (GC_gcjobjfreelist,
GC_gcj_malloc_initialized, GC_gcj_kind): Ditto.
* win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init,
GC_fault_handler_lock, GC_write_cs, GC_markers): Ditto.
* misc.c (GC_read, GC_register_finalizer_no_order, GC_init_dyld):
Move the declaration out of GC_init(); remove "extern".
* os_dep.c (GC_abort): Add the comment; add workaround to suppress
compiler "unreachable code" warnings for ABORT callers (where
ABORT is followed by a dummy return statement).
* os_dep.c (GC_old_allocator): Move the declaration out of
GC_default_push_other_roots(); remove "extern".
* darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume):
Move the declaration out of GC_stop_world() and GC_start_world()
(only if MPROTECT_VDB); remove "extern".

12 years ago2009-09-27 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sun, 27 Sep 2009 09:09:00 +0000 (09:09 +0000)]
2009-09-27  Ivan Maidanski <ivmai@mail.ru>

* win32_threads.c (GC_get_stack_min, GC_push_stack_for,
GC_get_next_stack): Recognize _WIN32_WCE_EMULATION macro (used for
WinCE emulation and for custom WinCE 6 devices); add the comment.
* win32_threads.c (GC_get_stack_min): Cast pointer to word instead
of DWORD.
* win32_threads.c (GC_get_next_stack): Don't use and maintain the
latest known stack_min value for WinCE (if GC_get_stack_min is
defined as a macro); update the comments.
* win32_threads.c (GC_wnt): Don't declare for WinCE.

12 years ago2009-09-26 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 26 Sep 2009 21:10:54 +0000 (21:10 +0000)]
2009-09-26  Ivan Maidanski <ivmai@mail.ru>

* Makefile.direct: Document EMPTY_GETENV_RESULTS.
* gcj_mlc.c (GC_clear_stack): Remove declaration.
* malloc.c (GC_clear_stack): Ditto.
* mallocx.c (GC_clear_stack): Ditto.
* typd_mlc.c (GC_clear_stack): Ditto.
* gcj_mlc.c (GENERAL_MALLOC, GENERAL_MALLOC_IOP): Rename to
GENERAL_MALLOC_INNER and GENERAL_MALLOC_INNER_IOP, respectively;
remove "lb" unnecessary cast to word.
* include/private/gc_priv.h (GC_clear_stack): Add declaration.
* include/private/gc_priv.h (GENERAL_MALLOC, GENERAL_MALLOC_IOP):
Move common declaration from typd_mlc.c and malloc.c; remove
unnecessary result and "lb" parameter casts.
* include/private/thread_local_alloc.h: Guard against duplicate
header file inclusion.
* os_dep.c (USE_MUNMAP): Replace "-->" with an error directive for
the case when USE_MMAP is not defined.
* pthread_support.c (GC_is_thread_tsd_valid): New internal
function (only if GC_ASSERTIONS and THREAD_LOCAL_ALLOC); move the
code from thread-local GC_malloc(); add FIXME for the condition.
* win32_threads.c (GC_is_thread_tsd_valid): Ditto.
* thread_local_alloc.c (GC_gcjobjfreelist): Change the type (to
match that of its definition).
* thread_local_alloc.c (GC_destroy_thread_local): Add a cast for
GC_gcjobjfreelist.
* thread_local_alloc.c (GC_lookup_thread, GC_lookup_thread_inner):
Remove unused declaration; don't include pthread.h.
* thread_local_alloc.c (GC_is_thread_tsd_valid): New declaration
(only if GC_ASSERTIONS).
* thread_local_alloc.c (GC_malloc): Use GC_is_thread_tsd_valid()
instead of GC_lookup_thread().
* win32_threads.c (GC_lookup_thread_inner): Define as STATIC.
* win32_threads.c (UNPROTECT): Rename to UNPROTECT_THREAD (to have
id different from that in os_dep.c).

12 years ago2009-09-26 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 26 Sep 2009 15:43:34 +0000 (15:43 +0000)]
2009-09-26  Ivan Maidanski <ivmai@mail.ru>

* allchblk.c (GC_enough_large_bytes_left): Replace "inline static"
with GC_INLINE.
* include/private/gc_priv.h (fixed_getenv): Ditto.
* alloc.c (GC_max, GC_min): Replace "static INLINE" with
GC_INLINE.
* mark_rts.c (rt_hash): Ditto.
* win32_threads.c (GC_get_max_thread_index): Ditto.
* include/private/gc_priv.h (INLINE): Prefix with "GC_"; include
"static"; define for Sun CC; define for VC++ (and other
compilers).
* pthread_support.c: Don't define __inline__ for non-GNU compilers
(not needed anymore).

12 years ago2009-09-26 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 26 Sep 2009 13:23:42 +0000 (13:23 +0000)]
2009-09-26  Ivan Maidanski <ivmai@mail.ru>

* NT_THREADS_MAKEFILE: Remove file (since it duplicates gc.mak).
* Makefile.in: Remove reference to NT_THREADS_MAKEFILE.
* Makefile.am: Ditto.
* Makefile.dj: Ditto.
* Makefile.direct: Ditto.
* doc/README.win32: Add reference to gc.mak.
* NT_X64_THREADS_MAKEFILE: Ditto.

12 years ago2009-09-26 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 26 Sep 2009 12:11:16 +0000 (12:11 +0000)]
2009-09-26  Ivan Maidanski <ivmai@mail.ru>

* Makefile.in: Regenerate (by autoreconf -vif).
* aclocal.m4: Ditto.
* compile: Ditto.
* config.guess: Ditto.
* config.sub: Ditto.
* configure: Ditto.
* depcomp: Ditto.
* install-sh: Ditto.
* ltmain.sh: Ditto.
* missing: Ditto.
* mkinstalldirs: Ditto.
* include/private/config.h.in: New file (generated).
* Makefile.direct: Remove references to acinclude.m4, libtool.m4.

12 years ago2009-09-26 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
ivmai [Sat, 26 Sep 2009 10:51:59 +0000 (10:51 +0000)]
2009-09-26  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)

* autogen.sh: Update.

12 years ago2009-09-26 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
ivmai [Sat, 26 Sep 2009 10:38:55 +0000 (10:38 +0000)]
2009-09-26  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)

* Makefile.am: Don't add libtool.m4 to EXTRA_DIST.
* acinclude.m4: Place GC_SET_VERSION in [].
* README.QUICK: Update information for Makefile.
* Makefile.am: Replace dist_pkgconfig_DATA with pkgconfig_DATA for
bdw-gc.pc.
* configure.ac: Enable tracetest.
* tests/tests.am: Ditto.

12 years ago2009-09-26 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 26 Sep 2009 10:15:21 +0000 (10:15 +0000)]
2009-09-26  Ivan Maidanski <ivmai@mail.ru>

* dyn_load.c (GC_wnt): Update the comment.
* dyn_load.c (GC_register_dynamic_libraries): Add the comment for
_WIN32_WCE_EMULATION; recognize GC_REGISTER_MEM_PRIVATE (new
macro); call GC_is_heap_base() only if check for Type succeeded.

12 years ago2009-09-26 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 26 Sep 2009 08:33:11 +0000 (08:33 +0000)]
2009-09-26  Ivan Maidanski <ivmai@mail.ru>

* mark_rts.c (GC_is_tmp_root): Don't define unless NO_DEBUGGING;
update the comment.
* include/private/gc_priv.h (GC_is_tmp_root): Remove declaration.

12 years ago2009-09-26 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 26 Sep 2009 06:48:44 +0000 (06:48 +0000)]
2009-09-26  Ivan Maidanski <ivmai@mail.ru>

* alloc.c: Expand all tabs to spaces; remove trailing spaces at
EOLn; remove multiple trailing blank lines.
* misc.c: Ditto.
* os_dep.c: Ditto.
* pthread_support.c: Ditto.
* include/private/gc_priv.h: Ditto.
* include/private/gcconfig.h: Ditto.

12 years ago2009-09-25 Hans Boehm <Hans.Boehm@hp.com>
hboehm [Sat, 26 Sep 2009 00:06:51 +0000 (00:06 +0000)]
2009-09-25  Hans Boehm <Hans.Boehm@hp.com>

* include/private/gcconfig.h (CANCEL_SAFE, IF_CANCEL): new macros.
* include/private/gc_priv.h (DISABLE_CANCEL, RESTORE_CANCEL,
ASSERT_CANCEL_DISABLED): New macros.
* alloc.c (GC_maybe_gc): Assert cancellation disabled.
(GC_collect_a_little_inner,GC_try_to_collect, GC_collect_or_expand):
Disable cancellation.
(GC_add_to_our_memory): Check for overflow.
* misc.c (GC_cancel_disable_count): declare.
(GC_init, GC_write): Disable cancellation.
(GC_init): Remove redundant GC_is_initialized test.
* os_dep.c (GC_repeat_read): Assert cancellation disabled.
(GC_get_stack_base): Disable cancellation.
* pthread_stop_world.c (GC_suspend_handler_inner): Disable
cancellation.
* pthread_support.c (GC_mark_thread): Permanently disable
cancellation.
(GC_wait_for_gc_completion, GC_wait_builder, GC_wait_marker):
Assert cancellation disabled.
(fork handling): Disable cancellation, fix comment.
(GC_pthread_create): Disable cancellation.
(GC_unregister_my_thread): Disable cancellation.
* Makefile.direct: Document NO_CANCEL_SAFE.

12 years ago2009-09-25 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 25 Sep 2009 18:59:02 +0000 (18:59 +0000)]
2009-09-25  Ivan Maidanski <ivmai@mail.ru>

* Makefile: Remove outdated file (Makefile.direct should be used
instead).

12 years ago2009-09-25 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 25 Sep 2009 12:23:46 +0000 (12:23 +0000)]
2009-09-25  Ivan Maidanski <ivmai@mail.ru>

* win32_threads.c: Reformat the code (make indentation and
opening bracket style uniform across the file; wrap long code and
comment lines).

12 years ago2009-09-25 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 25 Sep 2009 10:42:37 +0000 (10:42 +0000)]
2009-09-25  Ivan Maidanski <ivmai@mail.ru>

* include/gc.h (GC_use_DllMain): Refine (and reformat) the
comment.

12 years ago2009-09-25 Ivan Maidanski <ivmai@mail.ru> (really mostly Petter Urkedal)
ivmai [Fri, 25 Sep 2009 07:48:30 +0000 (07:48 +0000)]
2009-09-25  Ivan Maidanski <ivmai@mail.ru> (really mostly Petter Urkedal)

* configure.ac: Add documentation to AC_DEFINE for GC_THREADS and
EMPTY_GETENV_RESULTS.
* configure.ac: Fix a typo.
* Makefile.am: Ditto.

12 years ago2009-09-25 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 25 Sep 2009 07:13:13 +0000 (07:13 +0000)]
2009-09-25  Ivan Maidanski <ivmai@mail.ru>

* checksums.c (GC_checksum, GC_update_check_page): Remove
"register" keyword in local variable declarations (for the code
used only for debugging or which is not time-critical).
* dbg_mlc.c (GC_has_other_debug_info, GC_store_debug_info,
GC_store_debug_info_inner, GC_check_annotated_obj, GC_print_obj,
GC_print_smashed_obj, GC_debug_end_stubborn_change,
GC_debug_invoke_finalizer): Ditto.
* dyn_load.c (GC_register_dynamic_libraries): Ditto.
* mallocx.c (GC_realloc): Ditto.
* mark_rts.c (GC_print_static_roots, GC_is_static_root,
GC_clear_roots): Ditto.
* misc.c (GC_write): Ditto.
* os_dep.c (GC_print_callers): Ditto.
* dyn_load.c (GC_register_dynamic_libraries): Rename "i" local
variable to "j" for the nested loop (just not to hide the similar
variable in the outer one).
* mark_rts.c (GC_print_static_roots): Output an error message
using GC_err_printf() (instead of GC_printf()).

12 years ago2009-09-25 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
ivmai [Fri, 25 Sep 2009 05:13:53 +0000 (05:13 +0000)]
2009-09-25  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)

* configure.ac: Move include flag from ${INCLUDE} ...
* Makefile.am: ... to AM_CPPFLAGS and also add the build directory.
* configure.ac: Call AM_CONFIG_HEADER([include/private/config.h]).
* configure.ac: Add documentation to all AC_DEFINE either directly
or using AH_TEMPLATE.

12 years ago2009-09-24 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 24 Sep 2009 11:54:47 +0000 (11:54 +0000)]
2009-09-24  Ivan Maidanski <ivmai@mail.ru>

* win32_threads.c (GC_waitForSingleObjectInfinite): New static
function (only if GC_WINMAIN_REDIRECT).
* win32_threads.c (WinMain): Call GC_waitForSingleObjectInfinite()
thru GC_do_blocking() instead of calling WaitForSingleObject()
directly.

12 years ago2009-09-24 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 24 Sep 2009 08:21:32 +0000 (08:21 +0000)]
2009-09-24  Ivan Maidanski <ivmai@mail.ru>

* pthread_support.c (start_mark_threads): Refine printed message.
* win32_threads.c (GC_thr_init): Ditto.
* win32_threads.c: Reformat some code pieces (wrap too long code
lines).

12 years ago2009-09-24 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 24 Sep 2009 07:31:03 +0000 (07:31 +0000)]
2009-09-24  Ivan Maidanski <ivmai@mail.ru>
(ivmai145.diff)

* Makefile.direct (GC_WINMAIN_REDIRECT): Add the comment for.
* Makefile.direct (NO_GETENV): Update the comment.
* include/gc.h (GC_WINMAIN_WINCE_LPTSTR): Remove macro.
* include/gc.h (GC_WinMain): Remove declaration.
* include/gc.h (WinMain): Define (as GC_WinMain) if and only if
GC_WINMAIN_REDIRECT.
* tests/test.c (GC_COND_INIT): Define as GC_INIT() also in case of
WinCE target unless GC_WINMAIN_REDIRECT is defined.
* tests/test.c (WINMAIN_LPTSTR): New macro.
* tests/test.c (WinMain): Use WINMAIN_LPTSTR instead of LP[W]STR
and GC_WINMAIN_WINCE_LPTSTR.
* win32_threads.c (start_mark_threads): Add the comment for
MARK_THREAD_STACK_SIZE.
* win32_threads.c: Recognize new GC_WINMAIN_REDIRECT macro.
* win32_threads.c (WINMAIN_LPTSTR, WINMAIN_THREAD_STACK_SIZE): New
macro (only if GC_WINMAIN_REDIRECT).
* win32_threads.c: Undefine WinMain macro if GC_WINMAIN_REDIRECT.
* win32_threads.c (GC_WinMain): Add prototype (only if
GC_WINMAIN_REDIRECT).
* win32_threads.c (main_thread_args, WinMain): Rename
GC_WINMAIN_WINCE_LPTSTR to WINMAIN_LPTSTR.
* win32_threads.c (WinMain): Call GC_INIT() instead of GC_init();
use WINMAIN_THREAD_STACK_SIZE.
* win32_threads.c (WinMain): Call GC_deinit() and
DeleteCriticalSection() only if WinCE; add FIXME.

12 years ago2009-09-24 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 24 Sep 2009 07:20:18 +0000 (07:20 +0000)]
2009-09-24  Ivan Maidanski <ivmai@mail.ru>

* os_dep.c (GC_get_main_stack_base): add assertion for mem_base
value returned by GC_get_stack_base().

12 years ago2009-09-23 Ivan Maidanski <ivmai@mail.ru>
ivmai [Wed, 23 Sep 2009 06:57:52 +0000 (06:57 +0000)]
2009-09-23  Ivan Maidanski <ivmai@mail.ru>
(ivmai150.diff)

* Makefile.direct (MUNMAP_THRESHOLD, GC_FORCE_UNMAP_ON_GCOLLECT):
Add the comment for.
* alloc.c (GC_unmap_threshold, GC_force_unmap_on_gcollect):
Declare external variable (only if USE_MUNMAP).
* alloc.c (GC_try_to_collect): Temporarily set GC_unmap_threshold
value to 1 if GC_force_unmap_on_gcollect and restore it before
unlocking (only if USE_MUNMAP).
* doc/README.environment (GC_FORCE_UNMAP_ON_GCOLLECT): Add
information for.
* include/gc.h (GC_set_force_unmap_on_gcollect,
GC_get_force_unmap_on_gcollect): New public function prototype.
* include/gc.h (GC_FORCE_UNMAP_ON_GCOLLECT): New macro is
recognized.
* misc.c (GC_FORCE_UNMAP_ON_GCOLLECT): Ditto.
* include/gc.h (GC_INIT_CONF_FORCE_UNMAP_ON_GCOLLECT): New
internal macro (used by GC_INIT only).
* misc.c (GC_force_unmap_on_gcollect): New global variable.
* misc.c (GC_init): Recognize new "GC_FORCE_UNMAP_ON_GCOLLECT"
environment variable (and set GC_force_unmap_on_gcollect).
* misc.c (GC_set_force_unmap_on_gcollect,
GC_get_force_unmap_on_gcollect): New public function.
* tests/test.c (window_proc): Call GC_set_force_unmap_on_gcollect
to force the mode on if WM_HIBERNATE; restore the mode after
GC_gcollect().

12 years ago2009-09-23 Ivan Maidanski <ivmai@mail.ru>
ivmai [Wed, 23 Sep 2009 06:53:48 +0000 (06:53 +0000)]
2009-09-23  Ivan Maidanski <ivmai@mail.ru>

* Makefile.direct (LARGE_CONFIG): Update information.
* include/gc.h (GC_stop_func): Refine the comment.

12 years ago2009-09-21 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 21 Sep 2009 08:46:03 +0000 (08:46 +0000)]
2009-09-21  Ivan Maidanski <ivmai@mail.ru>

* configure.ac: Use EMPTY_GETENV_RESULTS instead of NO_GETENV for
Win32 (workaround for Wine bug).

12 years ago2009-09-20 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sun, 20 Sep 2009 08:07:27 +0000 (08:07 +0000)]
2009-09-20  Ivan Maidanski <ivmai@mail.ru>

* allchblk.c (GC_freehblk): Adjust local variables indentation.
* mallocx.c (GC_generic_malloc_many): Ditto.
* typd_mlc.c (GC_malloc_explicitly_typed_ignore_off_page,
GC_calloc_explicitly_typed): Ditto.
* typd_mlc.c (GC_make_array_descriptor): Remove unnecessary
brackets.

12 years ago2009-09-20 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sun, 20 Sep 2009 06:58:00 +0000 (06:58 +0000)]
2009-09-20  Ivan Maidanski <ivmai@mail.ru>

* configure.ac: Replace GC_WIN32_THREADS with GC_THREADS.
* configure.ac: Process enable_parallel_mark option for Cygwin and
Win32; define THREAD_LOCAL_ALLOC for Win32.

12 years ago2009-09-20 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sun, 20 Sep 2009 06:27:16 +0000 (06:27 +0000)]
2009-09-20  Ivan Maidanski <ivmai@mail.ru>

* include/private/gc_priv.h: Define AO_ASSUME_WINDOWS98 if
PARALLEL_MARK (required for VC++ x86).

12 years ago2009-09-19 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 19 Sep 2009 18:20:26 +0000 (18:20 +0000)]
2009-09-19  Ivan Maidanski <ivmai@mail.ru>
(ivmai149.diff)

* dbg_mlc.c (GC_generate_random_backtrace): Call
GC_try_to_collect(GC_never_stop_func) instead of GC_gcollect();
if GC is disabled then print error message and return.
* include/gc.h (GC_try_to_collect): Refine the comment.
* include/private/gc_priv.h (GC_never_stop_func): Fix return type;
refine the comment.

12 years ago2009-09-19 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 19 Sep 2009 11:43:14 +0000 (11:43 +0000)]
2009-09-19  Ivan Maidanski <ivmai@mail.ru>
(ivmai147.diff)

* add_gc_prefix.c: Move the file to the new "extra" directory.
* AmigaOS.c: Ditto.
* gcname.c: Ditto.
* if_mach.c: Ditto.
* if_not_there.c: Ditto.
* MacOS.c: Ditto.
* msvc_dbg.c: Ditto.
* setjmp_t.c: Ditto.
* threadlibs.c: Ditto.
* EMX_MAKEFILE: Prepend setjmp_t.c with "extra" directory.
* Makefile: Prepend AmigaOS.c, MacOS.c, add_gc_prefix.c, gcname.c,
if_mach.c, if_not_there.c, msvc_dbg.c, setjmp_t.c, threadlibs.c
with "extra" directory.
* Makefile.am: Ditto.
* Makefile.direct: Ditto.
* Makefile.dj: Ditto.
* Makefile.in: Ditto.
* NT_MAKEFILE: Prepend msvc_dbg.obj with "extra" directory.
* NT_STATIC_THREADS_MAKEFILE: Ditto.
* NT_X64_STATIC_THREADS_MAKEFILE: Ditto.
* NT_X64_THREADS_MAKEFILE: Ditto.
* NT_THREADS_MAKEFILE: Prepend msvc_dbg.c with "extra" directory.
* gc.mak: Ditto.
* PCR-Makefile: Prepend if_mach.c, if_not_there.c with "extra"
directory.
* SMakefile.amiga: Prepend AmigaOS.c, setjmp_t.c with "extra"
directory.
* doc/simple_example.html: Update for threadlibs.c.
* os_dep.c: Prepend included AmigaOS.c with "extra" directory.