platform/upstream/libgc.git
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 e55eb9c, 34a996f 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)

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

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

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

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

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

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

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

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

12 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).

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

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

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

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

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

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

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

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

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

12 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

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

12 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

12 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

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

12 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

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

12 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).

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

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

12 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()

12 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__.

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

12 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).

12 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).

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

12 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").

12 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).

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

12 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)

12 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).

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

12 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

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

12 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).

12 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).

12 years agoconfigure.ac: Expand tabs
Ivan Maidanski [Thu, 1 Dec 2011 09:36:53 +0000 (13:36 +0400)]
configure.ac: Expand tabs

12 years agoMerge 'github.com/ivmai/bdwgc/pull/7' request
Ivan Maidanski [Wed, 23 Nov 2011 10:39:52 +0000 (14:39 +0400)]
Merge 'github.com/ivmai/bdwgc/pull/7' request

12 years agoFlag autogen.sh as executable.
Bruce Mitchener [Wed, 23 Nov 2011 07:00:07 +0000 (14:00 +0700)]
Flag autogen.sh as executable.

12 years agoTypo fixes.
Bruce Mitchener [Wed, 23 Nov 2011 06:59:04 +0000 (13:59 +0700)]
Typo fixes.

12 years agoRemove unused 'destructor' parameter in 'specific' GC_key_create
Ivan Maidanski [Wed, 16 Nov 2011 15:57:17 +0000 (19:57 +0400)]
Remove unused 'destructor' parameter in 'specific' GC_key_create
function (add '_inner' suffix to the function name and create
GC_key_create proxy macro)

* include/private/specific.h (GC_key_create): Rename to
GC_key_create_inner; remove "destructor" parameter.
* specific.c (GC_key_create): Likewise.
* include/private/specific.h (GC_key_create): New macro redirecting
to GC_key_create_inner function.

12 years agoUpdate TODO file
Ivan Maidanski [Tue, 15 Nov 2011 16:30:54 +0000 (20:30 +0400)]
Update TODO file

12 years agoSupport GC_Create/ExitThread, GC_begin/endthreadex for Cygwin and
Ivan Maidanski [Tue, 15 Nov 2011 16:29:45 +0000 (20:29 +0400)]
Support GC_Create/ExitThread, GC_begin/endthreadex for Cygwin and
win32-pthread

* include/gc.h (GC_CreateThread, GC_ExitThread, GC_uintptr_t,
GC_beginthreadex, GC_endthreadex): Also declare (and redirect) for
GC_PTHREADS during GC build or if the client includes windows.h before
gc.h file; add a comment.
* win32_threads.c (thread_args, GC_win32_start_inner, GC_win32_start,
GC_CreateThread, GC_ExitThread, GC_beginthreadex, GC_endthreadex):
Also define for GC_PTHREADS.

12 years agoRemove PREFIXED in specific.c/h; mark "specific" functions as GC_INNER
Ivan Maidanski [Tue, 15 Nov 2011 11:24:33 +0000 (15:24 +0400)]
Remove PREFIXED in specific.c/h; mark "specific" functions as GC_INNER

* include/private/specific.h (PREFIXED): Remove.
* include/private/specific.h (key_t, key_create, setspecific,
remove_specific, slow_getspecific, getspecific): Expand PREFIXED macro
(add "GC_" prefix).
* specific.c (key_create, setspecific, remove_specific,
slow_getspecific, check_tsd_marks): Likewise.
* include/private/specific.h (GC_key_create, GC_setspecific,
GC_remove_specific, GC_slow_getspecific): Use GC_INNER for function.
* specific.c (GC_key_create, GC_setspecific, GC_remove_specific,
GC_slow_getspecific): Likewise.

12 years agoImplement precise value boundary check in GC_is_thread_tsd_valid
Ivan Maidanski [Tue, 15 Nov 2011 11:01:52 +0000 (15:01 +0400)]
Implement precise value boundary check in GC_is_thread_tsd_valid

* pthread_support.c (GC_is_thread_tsd_valid): Check tsd more correctly
using GC_thread and thread_local_freelists declarations; remove FIXME.
* win32_threads.c (GC_is_thread_tsd_valid): Likewise.

12 years agoFix thread_local_alloc GC_malloc[_atomic] for USE_CUSTOM_SPECIFIC TLS
Ivan Maidanski [Tue, 15 Nov 2011 10:44:29 +0000 (14:44 +0400)]
Fix thread_local_alloc GC_malloc[_atomic] for USE_CUSTOM_SPECIFIC TLS
platforms (e.g., Solaris)

* thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Test result of
GC_getspecific() for NULL in all cases except for USE_COMPILER_TLS and
USE_WIN32_COMPILER_TLS (i.e., no-op implementation of GC_getspecific).

12 years agoFix GC_finalized_malloc to fetch GC_oom_fn value atomically
Ivan Maidanski [Tue, 15 Nov 2011 10:31:54 +0000 (14:31 +0400)]
Fix GC_finalized_malloc to fetch GC_oom_fn value atomically

* fnlz_mlc.c (GC_finalized_malloc): Fetch GC_oom_fn value holding the
allocation lock.

12 years agoUpdate ChangeLog file
Ivan Maidanski [Mon, 14 Nov 2011 12:57:17 +0000 (16:57 +0400)]
Update ChangeLog file

12 years agoRename (shorten name of) finalized_mlc.c to fnlz_mlc.c file
Ivan Maidanski [Fri, 11 Nov 2011 13:55:13 +0000 (17:55 +0400)]
Rename (shorten name of) finalized_mlc.c to fnlz_mlc.c file

* finalized_mlc.c: Rename to fnlz_mlc.c file.
* BCC_MAKEFILE (XXXOBJS): Rename "finalized_mlc" to "fnlz_mlc".
* EMX_MAKEFILE (OBJS): Likewise.
* Makefile.am (libgc_la_SOURCES): Likewise.
* Makefile.direct (OBJS, CSRCS): Likewise.
* Makefile.dj (OBJS, CSRCS): Likewise.
* NT_MAKEFILE (OBJS): Likewise.
* NT_STATIC_THREADS_MAKEFILE (OBJS): Likewise.
* NT_X64_STATIC_THREADS_MAKEFILE (OBJS): Likewise.
* NT_X64_THREADS_MAKEFILE (OBJS): Likewise.
* OS2_MAKEFILE (OBJS): Likewise.
* PCR-Makefile (COBJ, CSRC): Likewise.
* SMakefile.amiga (OBJS, finalized_mlc.o): Likewise.
* WCC_MAKEFILE (OBJS): Likewise.
* digimars.mak (OBJS, finalized_mlc.o): Likewise.
* extra/gc.c: Likewise.
* gc.mak: Likewise.
* thread_local_alloc.c: Likewise.
* windows-untested/vc60/gc.dsp (SOURCE): Likewise.
* windows-untested/vc60/libgc.dsp (SOURCE): Likewise.
* windows-untested/vc70/gc.vcproj: Likewise.
* windows-untested/vc70/libgc.vcproj: Likewise.
* windows-untested/vc70/libgcmt.vcproj: Likewise.
* windows-untested/vc71/gc.vcproj: Likewise.
* windows-untested/vc71/libgc.vcproj: Likewise.
* windows-untested/vc71/libgcmt.vcproj: Likewise.

12 years agoFix some rare scripts for missing dependencies for finalized_mlc.c
Ivan Maidanski [Fri, 11 Nov 2011 13:47:03 +0000 (17:47 +0400)]
Fix some rare scripts for missing dependencies for finalized_mlc.c

* PCR-Makefile (CSRC): Add finalized_mlc.c emtry.
* digimars.mak (finalized_mlc.obj): Add dependency.
* gc.mak: Add 6 missing entries for finalized_mlc.

12 years agoResolve minor warnings (reported by GCC with '-pedantic') in checksums
Ivan Maidanski [Fri, 11 Nov 2011 12:51:45 +0000 (16:51 +0400)]
Resolve minor warnings (reported by GCC with '-pedantic') in checksums

* checksums.c (GC_update_check_page): Explicitly cast a pointer
argument of GC_printf to void* to match %p format specifier.

12 years agoFix extra/gc.c to include new finalized_mlc.c file
Ivan Maidanski [Fri, 11 Nov 2011 12:25:12 +0000 (16:25 +0400)]
Fix extra/gc.c to include new finalized_mlc.c file

* extra/gc.c: Include finalized_mlc.c file (after finalize.c).

12 years agoResolve minor warnings in tests (reported by GCC with '-pedantic' option)
Ivan Maidanski [Fri, 11 Nov 2011 12:18:13 +0000 (16:18 +0400)]
Resolve minor warnings in tests (reported by GCC with '-pedantic' option)

* tests/disclaim_test.c (pair_dct, pair_new): Explicitly cast
a pointer argument of GC_printf to void* to match %p format specifier.
* tests/test.c (cons, print_int_list, run_one_test, check_heap_stats):
Likewise.

12 years agoAdd macro to optionally omit GC_move_disappearing_link
Ivan Maidanski [Wed, 9 Nov 2011 09:59:11 +0000 (13:59 +0400)]
Add macro to optionally omit GC_move_disappearing_link

* finalize.c (GC_move_disappearing_link): Do not define if
GC_MOVE_DISAPPEARING_LINK_NOT_NEEDED defined (new macro).

12 years agoSwap GC_unregister_disappearing_link and GC_move_disappearing_link
Ivan Maidanski [Mon, 7 Nov 2011 07:38:36 +0000 (11:38 +0400)]
Swap GC_unregister_disappearing_link and GC_move_disappearing_link
prototypes order in include/gc.h

12 years agoRefactor GC_move_disappearing_link() code;
Ivan Maidanski [Mon, 7 Nov 2011 07:30:44 +0000 (11:30 +0400)]
Refactor GC_move_disappearing_link() code;
make GC_move_disappearing_link(link,link) return GC_SUCCESS

* finalize.c (GC_move_disappearing_link): Rename "from", "to"
arguments to "link" and "new_link", respectively.
* include/gc.h (GC_move_disappearing_link): Likewise.
* finalize.c (GC_move_disappearing_link): Rename "to_curr_dl",
"from_index", "to_index" local variables to "new_dl", "curr_index",
"new_index", respectively.
* finalize.c (GC_move_disappearing_link): Add curr_hidden_link,
new_hidden_link local variables to evaluate GC_HIDE_POINTER(link) and
GC_HIDE_POINTER(new_link) only once.
* finalize.c (GC_move_disappearing_link): Reformat code.
* finalize.c (GC_move_disappearing_link): Do not ABORT in case of
unaligned "link", return GC_NOT_FOUND instead (similar to
GC_unregister_disappearing_link behavior).
* finalize.c (GC_move_disappearing_link): If new_link is equal to
link then return GC_SUCCESS instead of GC_DUPLICATE.
* include/gc.h (GC_move_disappearing_link, GC_NOT_FOUND): Refine and
update documentation comment.
* tests/test.c (mktree): Add "new_link" local variable; add
GC_move_disappearing_link invocations; apply
GC_unregister_disappearing_link to "new_link".

12 years agoadd GC_move_disappearing_link
Andy Wingo [Wed, 26 Oct 2011 16:15:39 +0000 (18:15 +0200)]
add GC_move_disappearing_link

* finalize.c (GC_move_disappearing_link): New function, moves a
  disappearing link.

* include/gc.h: Add declaration, and new return code GC_NOT_FOUND.

12 years agoMerge branch 'master' of github.com:ivmai/bdwgc
Ivan Maidanski [Mon, 17 Oct 2011 18:03:05 +0000 (22:03 +0400)]
Merge branch 'master' of github.com:ivmai/bdwgc

12 years agoMerge remote-tracking branch 'origin/paurkedal-disclaim-v2'
Ivan Maidanski [Mon, 17 Oct 2011 17:52:48 +0000 (21:52 +0400)]
Merge remote-tracking branch 'origin/paurkedal-disclaim-v2'

12 years agoUpdate AUTHORS (add one email)
Ivan Maidanski [Sat, 15 Oct 2011 09:47:24 +0000 (13:47 +0400)]
Update AUTHORS (add one email)

12 years agoUpdate AUTHORS
Ivan Maidanski [Mon, 10 Oct 2011 07:39:21 +0000 (11:39 +0400)]
Update AUTHORS

12 years agogcconfig.h: Add machine description for Hexagon
Linas Vepstas [Mon, 10 Oct 2011 07:33:39 +0000 (11:33 +0400)]
gcconfig.h: Add machine description for Hexagon

12 years agoDo not define internal GC_parse_map_entry() unless really used.
Ivan Maidanski [Fri, 7 Oct 2011 14:33:50 +0000 (18:33 +0400)]
Do not define internal GC_parse_map_entry() unless really used.

* include/private/gc_priv.h (GC_parse_map_entry): Do not declare
unless USE_PROC_FOR_LIBRARIES.
* os_dep.c (GC_parse_map_entry): Test USE_PROC_FOR_LIBRARIES macro
in addition to DYNAMIC_LOADING (in condition whether to define this
function).

12 years agoResolve minor merge conflict in gc_disclaim.h, disclaim_bench.c
Ivan Maidanski [Fri, 30 Sep 2011 13:40:43 +0000 (17:40 +0400)]
Resolve minor merge conflict in gc_disclaim.h, disclaim_bench.c