]> granicus.if.org Git - gc/log
gc
12 years agoMove finalizer closure to the end of objects.
Petter Urkedal [Mon, 16 Jan 2012 20:51:35 +0000 (04:51 +0800)]
Move finalizer closure to the end of objects.

* fnlz_mlc.c: Move finalizer closure for finalized object kinds to the end
of objects.  This way, we don't require all interior pointers, and GC_base
returns the expected address.
* tests/disclaim_test.c: Improve test coverage.

12 years agoAdd 'const' qualifier to pointer argument of GC_clear/set_mark_bit,
Ivan Maidanski [Tue, 17 Jan 2012 15:44:39 +0000 (19:44 +0400)]
Add 'const' qualifier to pointer argument of GC_clear/set_mark_bit,
GC_finalized_malloc, GC_general_register_disappearing_link

* dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change):
Make argument pointer const.
* finalize.c (GC_general_register_disappearing_link): Likewise.
* fnlz_mlc.c (GC_core_finalized_malloc, GC_finalized_malloc): Likewise.
* include/gc.h (GC_change_stubborn, GC_end_stubborn_change,
GC_debug_change_stubborn, GC_debug_end_stubborn_change,
GC_general_register_disappearing_link): Likewise.
* include/gc_disclaim.h (GC_finalized_malloc): Likewise.
* include/gc_mark.h (GC_clear_mark_bit, GC_set_mark_bit): Likewise.
* mark.c (GC_set_mark_bit, GC_clear_mark_bit): Likewise.
* stubborn.c (GC_end_stubborn_change, GC_change_stubborn): Likewise.
* finalize.c (GC_general_register_disappearing_link): Remove redundant
pointer type casts.
* tests/test.c (cons, print_int_list, mktree): Likewise.
* include/gc.h (GC_GENERAL_REGISTER_DISAPPEARING_LINK): Add cast
removing potential 'const' qualifier.

12 years agoFix cordtest temporary file names for Win32
Ivan Maidanski [Tue, 17 Jan 2012 04:19:04 +0000 (08:19 +0400)]
Fix cordtest temporary file names for Win32

* cord/tests/cordtest.c (FNAME1, FNAME2): Do not specify folder
(platform-dependent) for temporary file; use same short file name
(DOS-compatible) for all targets.

12 years agoUpdate ChangeLog
Ivan Maidanski [Tue, 17 Jan 2012 04:02:00 +0000 (08:02 +0400)]
Update ChangeLog

12 years agoMove cord_pos.h to public headers folder (since included from cord.h)
Ivan Maidanski [Mon, 16 Jan 2012 05:24:57 +0000 (09:24 +0400)]
Move cord_pos.h to public headers folder (since included from cord.h)

* include/private/cord_pos.h: Rename to include/cord_pos.h.
* BCC_MAKEFILE (de_win.obj): Rename "private/cord_pos.h" entry to
"cord_pos.h".
* Makefile.direct (CORD_SRCS, CORD_INCLUDE_FILES): Likewise.
* Makefile.dj (CORD_SRCS, CORD_INCLUDE_FILES): Likewise.
* NT_MAKEFILE (de_win.obj): Likewise.
* NT_STATIC_THREADS_MAKEFILE (de_win.obj): Likewise.
* NT_X64_STATIC_THREADS_MAKEFILE (de_win.obj): Likewise.
* NT_X64_THREADS_MAKEFILE (de_win.obj): Likewise.
* OS2_MAKEFILE (cordbscs.obj, cordxtra.obj, cordprnt.obj,
cordtest.exe): Likewise.
* gc.mak (DEP_CPP_DE_WI, DEP_CPP_DE_C2e, DEP_CPP_CORDX,
DEP_CPP_CORDB): Likewise.
* include/include.am (dist_noinst_HEADERS): Likewise.
* include/cord.h: Include "private/cord_pos.h" instead of "cord_pos.h".
* include/cord_pos.h (CORD_H): Test (skip the file if undefined).
* include/cord_pos.h (CORD_POSITION_H): Define.

12 years agoMerge branch 'libcord-visibility'
Ivan Maidanski [Mon, 16 Jan 2012 12:03:34 +0000 (16:03 +0400)]
Merge branch 'libcord-visibility'

12 years agoconfigure: improve GCC '-fvisibility' option support checking
Ivan Maidanski [Mon, 16 Jan 2012 05:13:23 +0000 (09:13 +0400)]
configure: improve GCC '-fvisibility' option support checking

* configure.ac (GC_DLL): Add "-Werror" to CFLAGS (to treat warnings
as errors) when checking for "-fvisibility=hidden" support (useful for
Cygwin).

12 years agoRemove dependency on cord in gc_config_macros.h (libcord visibility fix)
Ivan Maidanski [Mon, 16 Jan 2012 04:55:33 +0000 (08:55 +0400)]
Remove dependency on cord in gc_config_macros.h (libcord visibility fix)

* include/cord.h: Do not include gc_config_macros.h.
* include/cord.h (CORD_API): Define similar to GC_API definition in
gc_config_macros.h.
* include/gc_config_macros.h: Revert changes done in
"libcord visibility fix" (do not test CORD_H, do not define
GC_API_EXPORT and GC_API_IMPORT).

12 years agoMinor adjustment of libcord visibility fix
Ivan Maidanski [Mon, 16 Jan 2012 04:42:33 +0000 (08:42 +0400)]
Minor adjustment of libcord visibility fix

* cord/cord.am (libcord_la_CPPFLAGS): Do not define CORD_BUILD and
GC_DLL here (same approach as for GC_BUILD).
* cord/cordbscs.c: Include config.h if HAVE_CONFIG_H (for GC_DLL) and
define CORD_BUILD (before including cord.h).
* cord/cordprnt.c: Likewise.
* cord/cordxtra.c: Likewise.

12 years agoFix visibility of symbols in libcord.
Petter Urkedal [Sat, 14 Jan 2012 10:11:12 +0000 (11:11 +0100)]
Fix visibility of symbols in libcord.

* include/gc_config_macros.h: Make the export specifications usable also to
the cord library.
* include/cord.h, include/private/cord_pos.h: Define CORD_API and annotate
the public API.

12 years agoAdd 'const' qualifier for GC_is_marked argument pointer
Ivan Maidanski [Fri, 13 Jan 2012 16:30:23 +0000 (20:30 +0400)]
Add 'const' qualifier for GC_is_marked argument pointer

* include/gc_mark.h (GC_is_marked): Refine comment.
* include/gc_mark.h (GC_is_marked): Make passed pointer const.
* mark.c (GC_is_marked): Likewise.
* mark.c (GC_is_marked): Cast result to int (instead of GC_bool).

12 years agoExport mark-bit manipulation functions.
Petter Urkedal [Sun, 8 Jan 2012 09:30:42 +0000 (17:30 +0800)]
Export mark-bit manipulation functions.

* include/private/gc_priv.h, include/gc_mark.h: Move GC_is_marked,
GC_clear_mark_bit and GC_set_mark_bit to a public header and adjust
prototypes and comment.
* mark.c: Adjust prototypes accordingly.

12 years agoFix extra/gc.c to enable GC source inclusion from multi-threaded app
Ivan Maidanski [Fri, 13 Jan 2012 15:53:47 +0000 (19:53 +0400)]
Fix extra/gc.c to enable GC source inclusion from multi-threaded app

* extra/gc.c: Include gc_pthread_redirects.h (unless
GC_NO_THREAD_REDIRECTS) to restore thread calls macro-based
redirection after the corresponding undef's in pthread_support.c.
* win32_threads.c: Restore thread calls macro-based redirection
(unless GC_NO_THREAD_REDIRECTS) at the file end.
* extra/gc.c: Remove "file not well tested" comment.

12 years agoAdd setter and getter for GC_on_heap_resize;
Ivan Maidanski [Fri, 13 Jan 2012 04:55:21 +0000 (08:55 +0400)]
Add setter and getter for GC_on_heap_resize;
change GC_on_heap_resize argument type from size_t to GC_word

* include/gc.h (GC_on_heap_resize_proc): Declare new type.
* alloc.c (GC_on_heap_resize): Change type to GC_on_heap_resize_proc
(which uses GC_word argument instead of size_t and GC_CALLBACK calling
conventions).
* include/gc.h (GC_on_heap_resize): Likewise.
* alloc.c (GC_expand_hp_inner): Do not cast GC_heapsize value in
GC_on_heap_resize call.
* include/gc.h (GC_on_heap_resize): Refine comment.
* include/gc.h (GC_set_on_heap_resize, GC_get_on_heap_resize): New
API functions.
* misc.c (GC_set_on_heap_resize, GC_get_on_heap_resize): Likewise.

12 years agoAdd on-heap-resize event notification to API
Paolo Molaro [Mon, 24 Jan 2005 15:29:23 +0000 (15:29 +0000)]
Add on-heap-resize event notification to API
(Apply part of commit 3f1314a from 'mono_libgc' branch)

* include/gc.h (GC_on_heap_resize): New API variable declaration.
* alloc.c (GC_on_heap_resize): New global variable.
* alloc.c (GC_finish_collection): Invoke GC_on_heap_resize (if
non-zero) on returning true.

12 years agoUpdate AUTHORS file
Ivan Maidanski [Thu, 12 Jan 2012 04:39:37 +0000 (08:39 +0400)]
Update AUTHORS file

12 years agoReplace repeating '==' sequences in documentation with double '=' mark
Ivan Maidanski [Thu, 12 Jan 2012 03:51:16 +0000 (07:51 +0400)]
Replace repeating '==' sequences in documentation with double '=' mark

* TODO: Replace sequences of repeating '==' identifying section
titles (which is also used by git-apply) with two '=' symbols at the
beginning and at the end of each title.
* ChangeLog: Likewise.
* doc/README.Mac: Likewise.
* doc/README.darwin: Likewise.
* configure.ac: Remove sequences of repeating '==' (in a comment).
* doc/README.amiga: Likewise.

12 years agoUpdate TODO file
Ivan Maidanski [Thu, 12 Jan 2012 03:37:15 +0000 (07:37 +0400)]
Update TODO file

12 years ago.gitignore: Ignore *.gc.log files
Ivan Maidanski [Thu, 12 Jan 2012 03:29:56 +0000 (07:29 +0400)]
.gitignore: Ignore *.gc.log files

12 years agoImprove GC_thread_is_registered implementation and testing
Ivan Maidanski [Thu, 12 Jan 2012 03:25:56 +0000 (07:25 +0400)]
Improve GC_thread_is_registered implementation and testing

* pthread_support.c (GC_thread_is_registered): Call pthread_self
outside LOCK; add DCL_LOCK_STATE declaration; replace "ptr" local
variable with "GC_thread me" (and remove cast).
* win32_threads.c (GC_thread_is_registered): Fix implementation by
calling GC_lookup_thread_inner (now works the same as in
pthread_support.c).
* tests/test.c (run_one_test): Test GC_thread_is_registered (only if
THREADS).

12 years agoAdd GC_thread_is_registered API function
Zoltan Varga [Thu, 3 Mar 2005 21:09:34 +0000 (21:09 +0000)]
Add GC_thread_is_registered API function
(Apply commit 9b40e5d from 'mono_libgc' branch)

* include/gc.h (GC_thread_is_registered): Declare new API function
(only if GC_THREADS).
* pthread_support.c (GC_thread_is_registered): New API function
implementation.
* win32_threads.c (GC_thread_is_registered): Likewise.

12 years agoOptimization: move pthread_self calls out of LOCK section
Ivan Maidanski [Tue, 10 Jan 2012 18:03:20 +0000 (22:03 +0400)]
Optimization: move pthread_self calls out of LOCK section

* pthread_support.c (GC_do_blocking_inner, GC_call_with_gc_active,
pthread_exit): Move pthread_self call out of LOCK section (declare
"self" local variable).
* win32_threads.c (GC_call_with_gc_active): Move GetCurrentThreadId
call out of LOCK section (declare "thread_id" local variable).

12 years agoFix GC_restart_handler to preserve errno if needed
Ivan Maidanski [Tue, 10 Jan 2012 17:00:59 +0000 (21:00 +0400)]
Fix GC_restart_handler to preserve errno if needed

* pthread_stop_world.c (GC_restart_handler): Preserve errno value in
case of sem_post or GC_log_printf invocation inside.

12 years agoEliminate code in GC_suspend_handler
Ivan Maidanski [Tue, 10 Jan 2012 16:33:57 +0000 (20:33 +0400)]
Eliminate code in GC_suspend_handler

* pthread_stop_world.c (GC_suspend_handler): Eliminate code
duplication (regarding errno save/restore).

12 years agoAdd assertion on result alignment to GC_unix_mmap_get_mem
Zoltan Varga [Tue, 23 May 2006 15:23:37 +0000 (15:23 +0000)]
Add assertion on result alignment to GC_unix_mmap_get_mem
(Apply commit 3e56070 from 'mono_libgc' branch)

* os_dep.c (GC_unix_mmap_get_mem): Add an assert to bail out early if
run on a machine with smaller page size than HBLKSIZE.

12 years agoFreeBSD: Add comment to SIG_SUSPEND/THR_RESTART definitions
Ivan Maidanski [Tue, 10 Jan 2012 13:18:10 +0000 (17:18 +0400)]
FreeBSD: Add comment to SIG_SUSPEND/THR_RESTART definitions

* include/private/gcconfig.h (SIG_SUSPEND, SIG_THR_RESTART): Add
comment (suggest alternate value) for FreeBSD/i386, FreeBSD/alpha and
FreeBSD/x86_64.

12 years agoAvoid unnecessary GC_find_limit invocation if GC_no_dls
Zoltan Varga [Mon, 23 Feb 2009 21:26:49 +0000 (21:26 +0000)]
Avoid unnecessary GC_find_limit invocation if GC_no_dls
(Apply commit f5d47a1 from 'mono_libgc' branch)

* os_dep.c (GC_init_linux_data_start): Avoid the call to
GC_find_limit() if GC_no_dls is TRUE, as it is not needed and
it complicates debugging since it causes a SIGSEGV.
* os_dep.c (GC_register_data_segments): Add assertion for DATASTART.

12 years agoAdd 'const' qualifier for GC_make_descriptor bitmap argument
Ivan Maidanski [Tue, 10 Jan 2012 10:16:26 +0000 (14:16 +0400)]
Add 'const' qualifier for GC_make_descriptor bitmap argument

* include/gc_typed.h (GC_make_descriptor): Make bm pointer const
(replace GC_bitmap type with "const GC_word*").
* typd_mlc.c (GC_add_ext_descriptor, GC_make_descriptor): Likewise.
* tests/test.c (bm_huge): Make array const to test updated
GC_make_descriptor declaration.

12 years agoEnable platform-specific disabling of static data scanning
Ivan Maidanski [Tue, 10 Jan 2012 09:58:14 +0000 (13:58 +0400)]
Enable platform-specific disabling of static data scanning
(Reworked commit a0347f0 from 'mono_libgc' branch)

* include/private/gcconfig.h (GC_DONT_REGISTER_MAIN_STATIC_DATA):
Recognize new macro.
* include/private/gcconfig.h (DYNAMIC_LOADING): Do not define for
Darwin/arm if GC_DONT_REGISTER_MAIN_STATIC_DATA.
* misc.c (GC_REGISTER_MAIN_STATIC_DATA): Define to FALSE if
GC_DONT_REGISTER_MAIN_STATIC_DATA (and not DYNAMIC_LOADING).

12 years agoWin32: allow DllMain chaining on the client side
Ivan Maidanski [Tue, 10 Jan 2012 06:27:33 +0000 (10:27 +0400)]
Win32: allow DllMain chaining on the client side
(Reworked commits e55eb9c34a996f from 'mono_libgc' branch)

* configure.ac (enable_win32_dllmain): Recognize new AC "enable"
option.
* configure.ac (GC_INSIDE_DLL): New AC macro (defined only if
enable_win32_dllmain).
* README.macros (GC_INSIDE_DLL): Document.
* include/gc.h (GC_DllMain): Declare as API function (for Win32) if
GC_INSIDE_DLL.
* win32_threads.c (GC_INSIDE_DLL): Recognize (treat the same as
GC_DLL).
* win32_threads.c (DllMain): Rename to GC_DllMain; use GC_API export
declarator if GC_INSIDE_DLL, otherwise define GC_DllMain macro as
a synonym to DllMain.

12 years agoUpdate ChangeLog
Ivan Maidanski [Fri, 30 Dec 2011 10:56:35 +0000 (14:56 +0400)]
Update ChangeLog

12 years agoUpdate TODO file
Ivan Maidanski [Fri, 30 Dec 2011 09:44:04 +0000 (13:44 +0400)]
Update TODO file

12 years agoMerge branch 'thread-dbg-msg-extend'
Ivan Maidanski [Thu, 29 Dec 2011 14:50:57 +0000 (18:50 +0400)]
Merge branch 'thread-dbg-msg-extend'

12 years agoReplace printf PRIxMAX specifier with '%p' for thread id debug output
Ivan Maidanski [Thu, 29 Dec 2011 14:46:53 +0000 (18:46 +0400)]
Replace printf PRIxMAX specifier with '%p' for thread id debug output

* pthread_support.c (GC_new_thread, GC_delete_thread,
GC_delete_gc_thread, GC_unregister_my_thread_inner,
GC_unregister_my_thread, GC_thread_exit_proc,
GC_start_rtn_prepare_thread, pthread_create): Output thread id value
(when DEBUG_THREADS) using %p format specifier instead of PRIxMAX, %x
and %lx (casting passed id value to pointer type instead of uintmax_t).
* pthread_start.c (GC_inner_start_routine): Likewise.
GC_stop_world, GC_thread_resume, GC_start_world): Likewise.
* pthread_stop_world.c (GC_suspend_handler_inner, GC_restart_handler,
GC_push_all_stacks, GC_suspend_all, GC_stop_world, GC_start_world):
Likewise.
* darwin_stop_world.c (GC_stack_range_for, GC_suspend_thread_list,
* pthread_start.c: Do not include inttypes.h.
* pthread_support.c: Likewise.
* pthread_support.c (GC_count_threads): Define only if DEBUG_THREADS.
* pthread_support.c (GC_unregister_my_thread): Rename gc_self local
variable to "me".
* pthread_support.c (pthread_create): Report thread started (when
DEBUG_THREADS) only if result is 0.

12 years agoAdd GC_is_heap_ptr() to GC API
Ivan Maidanski [Thu, 29 Dec 2011 12:12:37 +0000 (16:12 +0400)]
Add GC_is_heap_ptr() to GC API

* include/gc.h (GC_is_heap_ptr): New API function declaration.
* misc.c (GC_is_heap_ptr): New function.
* tests/test.c (run_one_test): Add GC_is_heap_ptr tests.

12 years agoUse EXPECT for checking various 'initialized' boolean variables
Ivan Maidanski [Thu, 29 Dec 2011 10:04:58 +0000 (14:04 +0400)]
Use EXPECT for checking various 'initialized' boolean variables

* alloc.c (GC_try_to_collect_general, GC_expand_hp): Use "expect true"
for GC_is_initialized value.
* gcj_mlc.c (maybe_finalize): Likewise.
* malloc.c (GC_alloc_large, GC_generic_malloc_inner, malloc): Likewise.
* mallocx.c (GC_generic_malloc_many): Likewise.
* mark_rts.c (GC_add_roots, GC_clear_roots): Likewise.
* misc.c (GC_base, GC_init): Likewise.
* ptr_chck.c (GC_same_obj, GC_is_valid_displacement, GC_is_visible):
Likewise.
* darwin_stop_world.c (GC_push_all_stacks): Use "expect true"
for GC_thr_initialized value.
* pthread_stop_world.c (GC_push_all_stacks): Likewise.
* pthread_support.c (pthread_create): Likewise.
* dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Use
"expect true" for excluded_segs value.
* include/private/gc_priv.h (COND_DUMP): Use "expect false"
for GC_dump_regularly value.
* malloc.c (GC_generic_malloc): Use "expect false" for GC_have_errors
value.
* mallocx.c (GC_generic_malloc_ignore_off_page,
GC_generic_malloc_many): Likewise.
* malloc.c (calloc): Use "expect true" for lib_bounds_set value.
* os_dep.c (GC_unix_mmap_get_mem): Use "expect true" for "initialized"
value.
* pthread_stop_world.c (GC_nacl_initialize_gc_thread): Use
"expect true" for GC_nacl_thread_parking_inited value.
* pthread_support.c (INIT_REAL_SYMS): Use "expect true" for
GC_syms_initialized value; remove redundant trailing ';'.
* pthread_support.c (GC_new_thread):  Use "expect true" for
first_thread_used value.
* win32_threads.c (GC_new_thread): Likewise.
* pthread_support.c (pthread_create): Use "expect true" for
parallel_initialized value.
* win32_threads.c (GC_CreateThread, GC_beginthreadex,
GC_pthread_join, GC_pthread_create, GC_pthread_sigmask,
GC_pthread_detach): Likewise.
* pthread_support.c (pthread_create): Use "expect false" for "si"
value to be NULL.
* thread_local_alloc.c (GC_init_thread_local): Use "expect true" for
keys_initialized value.
* typd_mlc.c (GC_make_descriptor): Use "expect true" for
GC_explicit_typing_initialized value.

12 years agoRefactoring: rename GC_EXPECT to EXPECT in .c files
Ivan Maidanski [Thu, 29 Dec 2011 08:37:01 +0000 (12:37 +0400)]
Refactoring: rename GC_EXPECT to EXPECT in .c files

* fnlz_mlc.c (GC_core_finalized_malloc, GC_finalized_malloc):
Rename GC_EXPECT to EXPECT; replace 0/1 with TRUE/FALSE for the 2nd
argument of EXPECT.
* thread_local_alloc.c (GC_gcj_malloc): Likewise.

12 years agoPrevent compiler warning in cordtest
Ivan Maidanski [Thu, 29 Dec 2011 08:16:05 +0000 (12:16 +0400)]
Prevent compiler warning in cordtest

* cord/tests/cordtest.c (id_cord_fn): Test client_data (at least to
prevent "unused argument" compiler warning).

12 years agoFix GC_ASSERT usage (fix missing trailing semi-colon)
Ivan Maidanski [Thu, 29 Dec 2011 06:38:09 +0000 (10:38 +0400)]
Fix GC_ASSERT usage (fix missing trailing semi-colon)

* misc.c (GC_init): Append ';' after GC_ASSERT().
* os_dep.c (GC_protect_heap): Likewise.

12 years agoRefactoring: rename GC_PRIdPTR to WARN_PRIdPTR
Ivan Maidanski [Thu, 29 Dec 2011 06:07:14 +0000 (10:07 +0400)]
Refactoring: rename GC_PRIdPTR to WARN_PRIdPTR

* allchblk.c (GC_allochblk_nth): Rename GC_PRIdPTR to WARN_PRIdPTR.
* alloc.c (GC_collect_or_expand): Likewise.
* include/private/gc_priv.h (GC_PRIdPTR): Likewise.
* pthread_support.c (start_mark_threads, GC_thr_init): Likewise.
* GC_thr_init (GC_delete_thread): Likewise.
* include/private/gc_priv.h (WARN): Add comment about argument format
specifier.
* include/private/gc_priv.h (GC_PRIdPTR): Remove commented out code;
refine comment.

12 years agoRemove dead rule for test_dll in Makefile.direct
Ivan Maidanski [Wed, 28 Dec 2011 13:04:05 +0000 (17:04 +0400)]
Remove dead rule for test_dll in Makefile.direct

* Makefile.direct (test_dll.o, test_dll): Remove obsolete rule
(that uses missing libgc_globals.h).
* Makefile.dj (test_dll.o, test_dll): Likewise.

12 years agoEMX_MAKEFILE: Remove GC general tuning macros description
Ivan Maidanski [Wed, 28 Dec 2011 12:56:22 +0000 (16:56 +0400)]
EMX_MAKEFILE: Remove GC general tuning macros description

12 years agoUpdate TODO file
Ivan Maidanski [Wed, 28 Dec 2011 12:37:31 +0000 (16:37 +0400)]
Update TODO file

12 years agoAdd cordtest to make check
Ivan Maidanski [Wed, 28 Dec 2011 12:35:53 +0000 (16:35 +0400)]
Add cordtest to make check

* cord/cord.am (TESTS, check_PROGRAMS): Add cordtest entry.
* cord/cord.am (cordtest_SOURCES, cordtest_LDADD): New AM variable.
* cord/cord.am (EXTRA_DIST): Remove cordtest.c entry.

12 years agoRemove unused __STDC__ and NO_SIGNALS macros
Ivan Maidanski [Wed, 28 Dec 2011 11:59:55 +0000 (15:59 +0400)]
Remove unused __STDC__ and NO_SIGNALS macros

* BCC_MAKEFILE (cflags): Remove -D __STDC__.
* digimars.mak (DEFINES): Likewise.
* Mac_files/MacOS_config.h (__STDC__, NO_SIGNALS): Remove macro.
* doc/README.Mac (__STDC__, NO_SIGNALS): Likewise.
* windows-untested/stdafx.h (__STDC__): Likewise.
* README: Remove obsolete information about NO_SIGNALS.

12 years agoRemove unused SILENT macro; remove duplicate MacOS_Test_config.h file
Ivan Maidanski [Wed, 28 Dec 2011 11:44:21 +0000 (15:44 +0400)]
Remove unused SILENT macro; remove duplicate MacOS_Test_config.h file

* Mac_files/MacOS_Test_config.h: Remove.
* Mac_files/MacOS_config.h: Expand tabs to spaces.
* Mac_files/MacOS_config.h (SILENT): Remove unused macro.
* windows-untested/stdafx.h (SILENT): Likewise.
* Mac_files/MacOS_config.h: Remove GC tuning macros description.
* Makefile.am (EXTRA_DIST): Remove MacOS_Test_config.h entry.
* Makefile.direct (OTHER_FILES): Likewise.
* Makefile.dj (OTHER_FILES): Likewise.
* doc/README.Mac: Update (remove info about MacOS_Test_config.h and
SILENT macro).

12 years agoconfigure: Do not install ancient new_gc_alloc.h broken for modern STL
Ivan Maidanski [Wed, 28 Dec 2011 11:05:52 +0000 (15:05 +0400)]
configure: Do not install ancient new_gc_alloc.h broken for modern STL

* include/include.am (pkginclude_HEADERS): Move new_gc_alloc.h entry
to dist_noinst_HEADERS.

12 years agoFix configure --enable-cplusplus make install
Ivan Maidanski [Wed, 28 Dec 2011 10:55:57 +0000 (14:55 +0400)]
Fix configure --enable-cplusplus make install

* Makefile.am (pkginclude_HEADERS): Remove gc_allocator.h
entry.
* Makefile.am (include_HEADERS): Add include/extra/gc_cpp.h entry
(only if CPLUSPLUS).
* include/include.am (pkginclude_HEADERS): Remove include/gc_cpp.h
entry.
* include/include.am (include_HEADERS): Remove include/extra/gc_cpp.h
entry.

12 years agotest_cpp: Recognize new macro to choose between GC allocator headers
Ivan Maidanski [Wed, 28 Dec 2011 10:19:28 +0000 (14:19 +0400)]
test_cpp: Recognize new macro to choose between GC allocator headers

* tests/test_cpp.cc (USE_STD_ALLOCATOR): Replace with
DONT_USE_STD_ALLOCATOR; remove explicit macro definition; add comment.
* tests/test_cpp.cc (main): Use DONT_USE_STD_ALLOCATOR macro instead
of USE_STD_ALLOCATOR.

12 years agoFix GC_printf import declarator in test_cpp.cc
Ivan Maidanski [Wed, 28 Dec 2011 08:44:06 +0000 (12:44 +0400)]
Fix GC_printf import declarator in test_cpp.cc

* tests/test_cpp.cc (GC_API_PRIV): New macro (same definition as in
gc_priv.h).
* tests/test_cpp.cc (GC_printf): Use GC_API_PRIV instead of GC_API.

12 years agoconfigure: ensure alphabetic order of files listed in include.am
Ivan Maidanski [Wed, 28 Dec 2011 08:30:45 +0000 (12:30 +0400)]
configure: ensure alphabetic order of files listed in include.am

* include/include.am (pkginclude_HEADERS, dist_noinst_HEADERS): Sort
entries lexicographically.

12 years agoconfigure: Remove duplicate AM entries for libcord
Ivan Maidanski [Wed, 28 Dec 2011 08:21:00 +0000 (12:21 +0400)]
configure: Remove duplicate AM entries for libcord

* cord/cord.am (EXTRA_DIST): Remove entries existing in
libcord_la_SOURCES.

12 years agoconfigure: Add javaxfc.h to the installation set of GC header files
Ivan Maidanski [Wed, 28 Dec 2011 07:22:19 +0000 (11:22 +0400)]
configure: Add javaxfc.h to the installation set of GC header files

* include/include.am (dist_noinst_HEADERS): Move include/javaxfc.h
entry to pkginclude_HEADERS.

12 years agoconfigure: do not compile pthread_stop_world.c for Cygwin/Darwin
Ivan Maidanski [Wed, 28 Dec 2011 07:13:35 +0000 (11:13 +0400)]
configure: do not compile pthread_stop_world.c for Cygwin/Darwin
(to reduce linker warnings about empty object files)

* Makefile.am (libgc_la_SOURCES): Do not add pthread_start.c,
pthread_support.c, pthread_stop_world.c entries for Cygwin and
win32-pthread; do not add pthread_stop_world.c entry for Darwin.

12 years agoFix compiler warning in GC_dyld_image_add/remove (Darwin)
Ivan Maidanski [Wed, 28 Dec 2011 06:42:49 +0000 (10:42 +0400)]
Fix compiler warning in GC_dyld_image_add/remove (Darwin)

* dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove): Declare i, j
local variables as unsigned (to prevent compiler warning in
a comparison involving sizeof)

12 years agoFix compiler warning in GC_dyld_image_add/remove (Darwin)
Ivan Maidanski [Wed, 28 Dec 2011 06:42:49 +0000 (10:42 +0400)]
Fix compiler warning in GC_dyld_image_add/remove (Darwin)

* dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove): Declare i, j
local variables as unsigned (to prevent compiler warning in
a comparison involving sizeof)

13 years agoExtend thread-related debug messages.
Petter Urkedal [Mon, 19 Sep 2011 06:37:47 +0000 (14:37 +0800)]
Extend thread-related debug messages.

13 years agoUpdate AUTHORS
Ivan Maidanski [Tue, 27 Dec 2011 15:23:11 +0000 (19:23 +0400)]
Update AUTHORS

13 years agoChanged the order in autogen.sh so ltmain exists in time for automake.
Eric Holk [Tue, 13 Dec 2011 23:45:34 +0000 (18:45 -0500)]
Changed the order in autogen.sh so ltmain exists in time for automake.

13 years agoUpdate AUTHORS
Ivan Maidanski [Tue, 27 Dec 2011 07:58:00 +0000 (11:58 +0400)]
Update AUTHORS

13 years agoMacOSX: Accept i386_ prefix for exception_state_t (for compatibility)
Ivan Maidanski [Tue, 27 Dec 2011 07:43:41 +0000 (11:43 +0400)]
MacOSX: Accept i386_ prefix for exception_state_t (for compatibility)

* os_dep.c (DARWIN_EXC_STATE, DARWIN_EXC_STATE_COUNT,
DARWIN_EXC_STATE_T): Define to i386_EXCEPTION_STATE,
i386_EXCEPTION_STATE_COUNT and i386_exception_state_t, respectively,
for Darwin/x86 if i386_EXCEPTION_STATE_COUNT macro is defined.

13 years agoFix gcconfig.h to define HBLKSIZE for Linux/mips
Richard Sandiford [Tue, 27 Dec 2011 07:25:27 +0000 (11:25 +0400)]
Fix gcconfig.h to define HBLKSIZE for Linux/mips
(Apply part of commit 438c5d9 from 'gcc_boehmgc' branch)

* include/private/gcconfig.h (HBLKSIZE): Define for MIPS.

13 years agoFix gcconfig.h to handle mips64-linux target
David Daney [Tue, 27 Dec 2011 07:18:11 +0000 (11:18 +0400)]
Fix gcconfig.h to handle mips64-linux target
(Apply part of commit 3cf0bae from 'gcc_boehmgc' branch)

* include/private/gcconfig.h (CPP_WORDSZ, ALIGNMENT): Handle
mips64-linux n64 ABI.

13 years agoconfigure: Add script code to force USE_MMAP for some targets
Ivan Maidanski [Mon, 26 Dec 2011 12:36:07 +0000 (16:36 +0400)]
configure: Add script code to force USE_MMAP for some targets
(Apply part of commit 21a49a9 from 'gcc_boehmgc' branch)

* configure.ac (gc_use_mmap): New variable (blank currently); add
comment and FIXME.
* configure.ac (USE_MMAP): Force define in case of gc_use_mmap is yes.

13 years agoconfigure: Remove undefined MMAP variable value processing case
Ivan Maidanski [Mon, 26 Dec 2011 11:52:17 +0000 (15:52 +0400)]
configure: Remove undefined MMAP variable value processing case

* configure.ac (munmap): Remove "$MMAP" processing (since the variable
is not defined anywhere).

13 years agoUpdate ChangeLog
Ivan Maidanski [Mon, 26 Dec 2011 07:48:18 +0000 (11:48 +0400)]
Update ChangeLog

13 years agoComplete GC documentation with 'finalization' topic
Ivan Maidanski [Mon, 26 Dec 2011 07:47:35 +0000 (11:47 +0400)]
Complete GC documentation with 'finalization' topic

* doc/finalization.html: New file (copy file from BDWGC site).
* Makefile.direct (DOC_FILES): Add "doc/finalization.html" entry.
* doc.am (dist_pkgdata_DATA): Likewise.
* doc/gcdescr.html: Convert absolute references to finalization.html
file to local ones.
* doc/gcinterface.html: Likewise.
* doc/overview.html: Likewise.

13 years agoLocalize references in 'doc' html files
Ivan Maidanski [Mon, 26 Dec 2011 07:18:55 +0000 (11:18 +0400)]
Localize references in 'doc' html files

* doc/gcinterface.html: Set "text/plain" type for references to GC
header files; make some absolute references to local (for HTML files
existing in doc folder).
* doc/overview.html: Likewise.

13 years agoReformat code of gc_cpp.cc/h
Ivan Maidanski [Mon, 26 Dec 2011 06:22:29 +0000 (10:22 +0400)]
Reformat code of gc_cpp.cc/h

* gc_cpp.cc (new, new[], delete[]): Reformat code.
* include/gc_cpp.h (GCPlacement, gc, gc_cleanup, new, new[], delete,
cleanup): Likewise.

13 years agoComment out unused argument names for new/delete in gc_cpp header
Ivan Maidanski [Fri, 23 Dec 2011 14:36:03 +0000 (18:36 +0400)]
Comment out unused argument names for new/delete in gc_cpp header

* include/gc_cpp.h (new, delete, new[], delete[]): Comment out unused
argument names (size, gcp, cleanup, clientData) to prevent warnings
by some compilers.

13 years agoUpdate TODO file
Ivan Maidanski [Fri, 23 Dec 2011 11:42:19 +0000 (15:42 +0400)]
Update TODO file

13 years agoMacOSX: Accept i386_ prefix for thread_state_t (for compatibility)
Ivan Maidanski [Fri, 23 Dec 2011 11:34:19 +0000 (15:34 +0400)]
MacOSX: Accept i386_ prefix for thread_state_t (for compatibility)

* include/private/gc_priv.h (GC_THREAD_STATE_T, GC_MACH_THREAD_STATE,
GC_MACH_THREAD_STATE_COUNT): Define to i386_thread_state_t,
i386_THREAD_STATE, i386_THREAD_STATE_COUNT for Darwin/x86 if the
latter macro is available (for compatibility).
* include/private/gc_priv.h (GC_MACH_THREAD_STATE,
GC_MACH_THREAD_STATE_COUNT): Define to ARM_MACHINE_THREAD_STATE and
ARM_MACHINE_THREAD_STATE_COUNT for Darwin/arm (iPhone), respectively,
if the latter macro is available.
* include/private/gc_priv.h (GC_MACH_THREAD_STATE,
GC_MACH_THREAD_STATE_COUNT): Define to platform-independent
MACHINE_THREAD_STATE and MACHINE_THREAD_STATE_COUNT for Darwin,
respectively, in case of missing platform-specific ones.

13 years agoFix make scripts after README.MacOSX file removal
Ivan Maidanski [Fri, 23 Dec 2011 07:03:50 +0000 (11:03 +0400)]
Fix make scripts after README.MacOSX file removal
(fix commit 89f1d2b)

* Makefile.direct (DOC_FILES): Remove doc/README.MacOSX entry.
* Makefile.dj (OTHER_FILES): Likewise.
* doc/doc.am (dist_pkgdata_DATA): Likewise.

13 years agoExpand tabs to spaces in some files
Ivan Maidanski [Thu, 22 Dec 2011 09:36:38 +0000 (13:36 +0400)]
Expand tabs to spaces in some files

* doc/tree.html: Expand tabs.
* include/ec.h: Likewise.
* include/gc_tiny_fl.h: Likewise.

13 years agoRemove trailing spaces at EOLn in all files
Ivan Maidanski [Thu, 22 Dec 2011 09:08:10 +0000 (13:08 +0400)]
Remove trailing spaces at EOLn in all files

13 years agoUpdate TODO file
Ivan Maidanski [Thu, 22 Dec 2011 08:50:16 +0000 (12:50 +0400)]
Update TODO file

13 years agodoc/README.MacOSX: Remove empty file
Ivan Maidanski [Thu, 22 Dec 2011 08:44:53 +0000 (12:44 +0400)]
doc/README.MacOSX: Remove empty file

13 years agoAdd .gitattributes to ensure normalized text line encodings in repo
Ivan Maidanski [Thu, 22 Dec 2011 08:16:41 +0000 (12:16 +0400)]
Add .gitattributes to ensure normalized text line encodings in repo

13 years ago.gitignore: Ignore config.cache
Ivan Maidanski [Thu, 22 Dec 2011 07:10:25 +0000 (11:10 +0400)]
.gitignore: Ignore config.cache

13 years agoMerge 'get-restart-signal-feature' branch
Ivan Maidanski [Tue, 20 Dec 2011 09:58:33 +0000 (13:58 +0400)]
Merge 'get-restart-signal-feature' branch

13 years agoUpdate ChangeLog
Ivan Maidanski [Mon, 19 Dec 2011 12:29:23 +0000 (16:29 +0400)]
Update ChangeLog

13 years agoFix GC_get_thr_restart_signal for Darwin and Win32
Ivan Maidanski [Mon, 19 Dec 2011 12:27:18 +0000 (16:27 +0400)]
Fix GC_get_thr_restart_signal for Darwin and Win32

* misc.c (GC_get_thr_restart_signal): Implement for Darwin and Win32
(always returns -1) if THREADS.
* pthread_stop_world.c (GC_get_thr_restart_signal): Remove
implementation for Darwin/Win32 (since the file might not be included
for these targets).

13 years agoUpdate AUTHORS
Ivan Maidanski [Mon, 19 Dec 2011 12:06:00 +0000 (16:06 +0400)]
Update AUTHORS

13 years agoFix GC_get_thr_restart_signal for OpenBSD and NaCl
Ivan Maidanski [Mon, 19 Dec 2011 12:05:39 +0000 (16:05 +0400)]
Fix GC_get_thr_restart_signal for OpenBSD and NaCl

* include/gc.h (GC_get_thr_restart_signal): Refine comment.
* pthread_stop_world.c (GC_get_thr_restart_signal): Return -1 for
OpenBSD and NaCl.

13 years agoAdded GC_get_thr_restart_signal()
Jan Wielemaker [Fri, 16 Dec 2011 08:46:38 +0000 (09:46 +0100)]
Added GC_get_thr_restart_signal()

13 years agoRecognize __ANDROID__ as synonym for PLATFORM_ANDROID
Ivan Maidanski [Fri, 16 Dec 2011 11:07:14 +0000 (15:07 +0400)]
Recognize __ANDROID__ as synonym for PLATFORM_ANDROID

* README.macros (PLATFORM_ANDROID): Update.
* include/gc_config_macros.h (__ANDROID__): Recognize as a synonym for
PLATFORM_ANDROID.
* include/private/gcconfig.h (PLATFORM_ANDROID): Define if __ANDROID__.

13 years agoUpdate ChangeLog and TODO files
Ivan Maidanski [Thu, 15 Dec 2011 15:03:42 +0000 (19:03 +0400)]
Update ChangeLog and TODO files

13 years agoInstruct configure to hide internal libgc.so symbols if supported (GCC)
Ivan Maidanski [Thu, 15 Dec 2011 15:01:47 +0000 (19:01 +0400)]
Instruct configure to hide internal libgc.so symbols if supported (GCC)

* configure.ac (ac_cv_fvisibility_hidden): New variable (set to "yes"
if only shared library is built and GCC supports "-fvisibility" option.
* configure.ac (CFLAGS): Add "-fvisibility=hidden" and
"-DGC_VISIBILITY_HIDDEN_SET" if ac_cv_fvisibility_hidden is "yes".
* include/gc_config_macros.h (GC_API): Force "default visibility"
attribute if GC_VISIBILITY_HIDDEN_SET (only if GCC and GC_BUILD).
* tests/staticrootstest.c (GC_VISIBILITY_HIDDEN_SET): Test the macro
and skip the test if defined (since "staticrootslib" symbols are of
hidden visibility).

13 years agoFix configure to disable GCC aliasing optimization unless forced to
Ivan Maidanski [Thu, 15 Dec 2011 13:42:01 +0000 (17:42 +0400)]
Fix configure to disable GCC aliasing optimization unless forced to

* configure.ac (ac_cv_fno_strict_aliasing): New variable (set to
"skipped" if the client passed "-fstrict-aliasing" option to CFLAGS
else set to "yes" if GCC supports "-fno-strict-aliasing" option,
otherwise set to "no").
* configure.ac (CFLAGS): Append "-fno-strict-aliasing" if
ac_cv_fno_strict_aliasing is "yes" (only if GCC).

13 years agoAdd configure option to compile all library .c files into single gc.o
Ivan Maidanski [Thu, 15 Dec 2011 12:02:38 +0000 (16:02 +0400)]
Add configure option to compile all library .c files into single gc.o

* Makefile.am (SINGLE_GC_OBJ): Test new AM conditional.
* Makefile.am (libgc_la_SOURCES): Put only extra/gc.c entry here if
SINGLE_GC_OBJ.
* Makefile.am (EXTRA_DIST): Add extra/gc.c only if not SINGLE_GC_OBJ.
* configure.ac (single-obj-compilation): New AC "enable" argument
(turning on compilation of single extra/gc.c file instead of all .c
files from GC base folder).
* configure.ac (SINGLE_GC_OBJ): New AM conditional.

13 years agoconfigure: Move 'mach_dep' file processing logic to Makefile.am
Ivan Maidanski [Thu, 15 Dec 2011 09:49:24 +0000 (13:49 +0400)]
configure: Move 'mach_dep' file processing logic to Makefile.am

* Makefile.am (libgc_la_SOURCES): Add "mach_dep.c"; order entries
lexicographically.
* Makefile.am (EXTRA_DIST): Remove "mach_dep.c" entry.
* configure.ac (machdep): Do not add "mach_dep.lo" entry; remove empty
case block; merge similar case blocks (for "sparc_mach_dep.lo").

13 years agoAdd GC_UNDERSCORE_STDCALL, UNICODE macro templates to configure (Win32)
Ivan Maidanski [Thu, 15 Dec 2011 08:12:07 +0000 (12:12 +0400)]
Add GC_UNDERSCORE_STDCALL, UNICODE macro templates to configure (Win32)

* configure.ac (GC_UNDERSCORE_STDCALL, UNICODE): New AH template (has
meaning only for Win32).

13 years agoconfigure: Define GC_READ_ENV_FILE for WinCE.
Ivan Maidanski [Thu, 15 Dec 2011 07:42:50 +0000 (11:42 +0400)]
configure: Define GC_READ_ENV_FILE for WinCE.

* configure.ac (GC_READ_ENV_FILE): Define AC macro for WinCE unless
'--disable-gc-debug' is set.

13 years ago.gitignore: Ignore Gcov files (.gcda, .gcno)
Ivan Maidanski [Tue, 13 Dec 2011 14:43:27 +0000 (18:43 +0400)]
.gitignore: Ignore Gcov files (.gcda, .gcno)

13 years agoconfigure: Do not pass '-Wextra' option to GCC if unsupported
Ivan Maidanski [Tue, 13 Dec 2011 11:37:59 +0000 (15:37 +0400)]
configure: Do not pass '-Wextra' option to GCC if unsupported

* configure.ac (WEXTRA): New variable (set to "-Wextra" if the latter
is supported by GCC, otherwise to "-W").
* configure.ac (CFLAGS): Use WEXTRA variable (only if GCC).

13 years agoFix use of enable_gc_debug in configure (DG/UX on AViiON)
Ivan Maidanski [Tue, 13 Dec 2011 07:06:44 +0000 (11:06 +0400)]
Fix use of enable_gc_debug in configure (DG/UX on AViiON)

* configure.ac (ac_is_dgux): Move down to below gc-debug processing
(DG/UX) since it uses "enable_gc_debug" variable; remove FIXME.

13 years agoMerge pull request #8 from waywardmonkeys/typos
Ivan Maidanski [Fri, 9 Dec 2011 09:16:49 +0000 (01:16 -0800)]
Merge pull request #8 from waywardmonkeys/typos

Fix some typos in documentation

13 years agoFix some typos.
Bruce Mitchener [Fri, 9 Dec 2011 04:23:00 +0000 (11:23 +0700)]
Fix some typos.

13 years agoOn altering CFLAGS value in configure place client flags at end
Ivan Maidanski [Thu, 1 Dec 2011 10:34:00 +0000 (14:34 +0400)]
On altering CFLAGS value in configure place client flags at end

* configure.ac (CFLAGS): Always append old CFLAGS value (instead of
placing it at start).

13 years agoPreserve client-specified CFLAGS for DG/UX
Ivan Maidanski [Thu, 1 Dec 2011 09:47:26 +0000 (13:47 +0400)]
Preserve client-specified CFLAGS for DG/UX

* configure.ac (CFLAGS, CXXFLAGS): Preserve C/C++ flags passed by
client (DG/UX only); remove code duplication (put common flags to
"dgux_spec_opts" variable).