platform/upstream/libgc.git
12 years agoMerge remote-tracking branch 'remotes/paurkedal/t/disclaim-pullreq' into paurkedal...
Ivan Maidanski [Fri, 23 Sep 2011 10:47:59 +0000 (14:47 +0400)]
Merge remote-tracking branch 'remotes/paurkedal/t/disclaim-pullreq' into paurkedal-disclaim-v2

12 years agoChange configure to define NO_DEBUGGING if "--disable-gc-debug"
Ivan Maidanski [Fri, 23 Sep 2011 07:59:19 +0000 (11:59 +0400)]
Change configure to define NO_DEBUGGING if "--disable-gc-debug"

* configure.ac (NO_DEBUGGING): Define based on testing enable_gc_debug
value (instead of based on with_cross_host value).

12 years agoFix commit 505b041 regarding configure THREAD_LOCAL_ALLOC (Win32)
Ivan Maidanski [Fri, 23 Sep 2011 07:45:54 +0000 (11:45 +0400)]
Fix commit 505b041 regarding configure THREAD_LOCAL_ALLOC (Win32)

* configure.ac (THREAD_LOCAL_ALLOC): Test enable_shared and
enable_static values properly when setting THREAD_LOCAL_ALLOC
in case PARALLEL_MARK is off (Win32 only).

12 years agoUpdate TODO file
Ivan Maidanski [Thu, 22 Sep 2011 11:48:21 +0000 (15:48 +0400)]
Update TODO file

12 years agoDefine GC_DLL if building only dynamic libraries.
Ivan Maidanski [Thu, 22 Sep 2011 11:46:54 +0000 (15:46 +0400)]
Define GC_DLL if building only dynamic libraries.
Update README for Cygwin/MinGW.

* configure.ac (GC_DLL): New AC template; define if only the dynamic
libraries are being built.
* configure.ac (THREAD_LOCAL_ALLOC): Define for Win32 implicitly
if static libraries are being built (i.e. GC_DLL is not defined).
* doc/README.win32: Update "GNU Tools" section.

12 years agoFix thread model in configure for MinGW.
Ivan Maidanski [Thu, 22 Sep 2011 11:40:31 +0000 (15:40 +0400)]
Fix thread model in configure for MinGW.

* configure.ac (THREADS): Change "posix" to "win32" in case of
cross-compiling to MinGW.

12 years agoEnable parallel marker in configure for Solaris.
Ivan Maidanski [Thu, 22 Sep 2011 11:30:02 +0000 (15:30 +0400)]
Enable parallel marker in configure for Solaris.

* configure.ac (PARALLEL_MARK): Check --enable-parallel-mark also for
Solaris.

12 years agoAdd missing GC_ATTR_UNUSED annotation to some functions in gctest
Ivan Maidanski [Thu, 22 Sep 2011 11:23:58 +0000 (15:23 +0400)]
Add missing GC_ATTR_UNUSED annotation to some functions in gctest

* tests/test.c (tiny_reverse_test, WinMain, thr_run_one_test,
thr_window): Tag the arguments with GC_ATTR_UNUSED.

12 years agoRemove obsolete Makefile.DLL (superseded by cygwin/mingw configure)
Ivan Maidanski [Thu, 22 Sep 2011 08:58:56 +0000 (12:58 +0400)]
Remove obsolete Makefile.DLL (superseded by cygwin/mingw configure)

* Makefile.DLL: Remove.
* Makefile.am (EXTRA_DIST): Remove Makefile.DLL entry.
* Makefile.direct (OTHER_MAKEFILES): Likewise.
* Makefile.dj (OTHER_FILES): Likewise.
* Makefile.direct: Remove comment about Makefile.DLL.

12 years agoAdd TODO item
Ivan Maidanski [Wed, 21 Sep 2011 13:05:34 +0000 (17:05 +0400)]
Add TODO item

12 years ago.gitignore: Add subthread_create
Ivan Maidanski [Tue, 20 Sep 2011 15:44:53 +0000 (19:44 +0400)]
.gitignore: Add subthread_create

12 years agoFix GC_inner_start_routine() to prevent local variable clobbering.
Ivan Maidanski [Tue, 20 Sep 2011 08:15:17 +0000 (12:15 +0400)]
Fix GC_inner_start_routine() to prevent local variable clobbering.

* pthread_start.c (GC_inner_start_routine): Add volatile to "me" local
variable to prevent its clobbering.

12 years agoAdd missing GC_ATTR_UNUSED annotation to mark_ex_handler().
Ivan Maidanski [Tue, 20 Sep 2011 08:02:16 +0000 (12:02 +0400)]
Add missing GC_ATTR_UNUSED annotation to mark_ex_handler().

* mark.c (mark_ex_handler): Tag "disp_ctxt" argument with
GC_ATTR_UNUSED.

12 years agoAdjust subthread_create test.
Ivan Maidanski [Tue, 20 Sep 2011 07:58:56 +0000 (11:58 +0400)]
Adjust subthread_create test.

* tests/subthread_create.c: Skip test if AO_fetch_and_add is missing.
* tests/subthread_create.c: Implement for Win32 threads (include
windows.h instead of pthread.h unless GC_PTHREADS).
* tests/subthread_create.c (entry, main): Likewise.
* tests/subthread_create.c (MAX_SUBTHREAD_DEPTH, MAX_SUBTHREAD_COUNT,
INITIAL_THREAD_COUNT): Define only if INITIAL_THREAD_COUNT undefined.
* tests/subthread_create.c (MAX_ALIVE_THREAD_COUNT): New macro.
* tests/subthread_create.c (DECAY_NUMER, DECAY_DENOM): Define only if
DECAY_NUMER is undefined.
* tests/subthread_create.c (INITIAL_THREAD_COUNT, MAX_SUBTHREAD_DEPTH,
MAX_SUBTHREAD_COUNT): Make the values smaller.
* tests/subthread_create.c (thread_created_cnt): Move out of entry();
make volatile.
* tests/subthread_create.c (thread_ended_cnt): New AO variable.
* tests/subthread_create.c (entry): Use "arg" value (instead of
address); adjust thread_ended_cnt on function exit; print thread
number in case of failure; limit the number of concurrently running
threads (by MAX_ALIVE_THREAD_COUNT).
* tests/subthread_create.c (main): Print threads creation statistic on
exit; exit with code 1 (instead of 69) in case of failure.

12 years agotests: print a message in case a test is a no-op.
Ivan Maidanski [Tue, 20 Sep 2011 07:45:02 +0000 (11:45 +0400)]
tests: print a message in case a test is a no-op.

* tests/threadkey_test.c (main): Print a message if the test is
skipped.

12 years agoMerge remote-tracking branch 'paurkedal/pullreq/subthread_create_test'
Ivan Maidanski [Tue, 20 Sep 2011 06:33:11 +0000 (10:33 +0400)]
Merge remote-tracking branch 'paurkedal/pullreq/subthread_create_test'

12 years agoFix issues proposed in Ivan's previous commit, etc.
Petter Urkedal [Tue, 13 Sep 2011 21:28:27 +0000 (23:28 +0200)]
Fix issues proposed in Ivan's previous commit, etc.

* disclaim.c -> {finalized_mlc.c, misc.c}: Move low-level code to misc.c and
the finalized object-kind to finalized_mlc.c.
* Makefile.am: Update accordingly.
* reclaim.c: Condition #include "gc_disclaim.h" and remove "register".
* include/gc_disclaim.h, include/private/gc_priv.h, finalized_mlc.c, misc.c:
Add GC_API, GC_CALL, and GC_CALLBACK.  Use typedefs for function pointers.
* tests/disclaim_test.c, tests/disclaim_bench.c: Fix portability and other
issues.

* include/gc_disclaim.h: Forward declare ...
* finalized_mlc.c: ... and export GC_finalized_objfreelist.
* thread_local_alloc.c (GC_destroy_thread_local): Return finalized
freelists though the same global.
* include/private/thread_local_alloc.h: Tweak (move array above comment).

* Makefile.dj, NT_MAKEFILE, NT_STATIC_THREADS_MAKEFILE,
NT_X64_STATIC_THREADS_MAKEFILE, NT_X64_THREADS_MAKEFILE, gc.mak,
windows-untested/vc60/gc.dsp, windows-untested/vc70/gc.vcproj,
windows-untested/vc71/gc.vcproj: Add include/gc_disclaim.h to various build
systems.  (Untested.)

12 years agoENABLE_DISCLAIM: Make stylistic fixes in many places and add many FIXME.
Ivan Maidanski [Tue, 13 Sep 2011 06:58:36 +0000 (10:58 +0400)]
ENABLE_DISCLAIM: Make stylistic fixes in many places and add many FIXME.

12 years agoAdd and update some copyright and remove README.disclaim.
Petter Urkedal [Sat, 10 Sep 2011 13:09:41 +0000 (15:09 +0200)]
Add and update some copyright and remove README.disclaim.

* README.disclaim: Remove as it only contained patching instructions.
* disclaim.c: Add copyright notice.
* include/gc_disclaim.h: Update year on copyright notice.

12 years agoFix some issues and avoid warnings in disclaim-related code.
Petter Urkedal [Sat, 10 Sep 2011 12:03:16 +0000 (14:03 +0200)]
Fix some issues and avoid warnings in disclaim-related code.

* disclaim.c, include/gc_disclaim.h: Fix prototype.
* include/private/gc_priv.h, mark.c: Avoid missing initializer warning.
* mark.c: Fix type of a size_t variable in GC_reclaim_block.
* misc.c: Initialize ok_mark_unconditionally.
* reclaim.c: Tweak and avoid unused label warning.
* tests/disclaim_bench.c, tests/disclaim_test.c: Remove or
conditionalize unused variables.

12 years agoImplement freeing of blocks with disclaim callbacks.
Petter Urkedal [Mon, 15 Aug 2011 21:21:56 +0000 (23:21 +0200)]
Implement freeing of blocks with disclaim callbacks.

12 years agoAdjust comments and whitespace.
Petter Urkedal [Thu, 27 May 2010 22:10:57 +0000 (00:10 +0200)]
Adjust comments and whitespace.

12 years agoAdjustment to disclaim.c after config.h and a prototype change.
Petter Urkedal [Wed, 30 Sep 2009 21:19:52 +0000 (23:19 +0200)]
Adjustment to disclaim.c after config.h and a prototype change.

12 years agoFixed compilation errors, also tests passes.
Petter Urkedal [Wed, 22 Oct 2008 17:29:48 +0000 (19:29 +0200)]
Fixed compilation errors, also tests passes.

reclaim.c: Removed obsolete argument to GC_reclaim_small_nonempty_block.

12 years agoFixed memory leak issue with unconditional marking.
Petter Urkedal [Sun, 4 May 2008 16:12:52 +0000 (18:12 +0200)]
Fixed memory leak issue with unconditional marking.

12 years agodisclaim.c: Renamed RAW_BYTES_FROM_INDEX to GC_RAW_BYTES_FROM_INDEX according to...
Petter Urkedal [Sat, 12 Jan 2008 12:34:11 +0000 (13:34 +0100)]
disclaim.c: Renamed RAW_BYTES_FROM_INDEX to GC_RAW_BYTES_FROM_INDEX according to change in original branch.

README.disclaim: Patching instruction.

12 years agoAdd disclaim callbacks for efficient finalization.
Petter Urkedal [Sun, 1 Jul 2007 11:48:00 +0000 (13:48 +0200)]
Add disclaim callbacks for efficient finalization.

Importing gc-20070403-disclaim-1.0.patch.

* configure.ac: Add --disable-disclaim option and set ENABLE_DISCLAIM macro
and conditional accordingly.
* include/include.am, Makefile.am Add sources disclaim.c and
include/gc_disclaim.h.
* Makefile.direct: Ditto and define ENABLE_DISCLAIM.

* include/private/gc_priv.h (obj_kind): Add ok_mark_unconditionally,
ok_disclaim_proc and ok_disclaim_cd.
* misc.c (GC_new_kind_inner): Initialize them.
* include/private/gc_priv.h (hblkhdr): Add HAS_DISCLAIM and
MARK_UNCONDITIONALLY flags.
* allchblk.c (setup_header): Set HAS_DISCLAIM and MARK_UNCONDITIONALLY flags
as indicated by the object kind.

* reclaim.c: Main adjustments to support the disclaim callbacks.
* mark.c (GC_push_unconditionally, GC_push_next_marked_uncollecable):
Unconditionally mark from objects in blocks flagged MARK_UNCONDITIONALLY.
This preserves links reachable from the finalizer when using the the
finalized object kind.

* disclaim.c: Add file with support functions for disclaim callbacks and
implementation of the "finalized" object kind.
* include/gc_disclaim.h: Add file providing the corresponding API.
* include/private/thread_local_alloc.h (thread_local_freelists): Add
finalized_freelists.
* thread_local_alloc.c: Initialize them.

* tests/tests.am, tests/disclaim_test.c, tests/disclaim_bench.c: Add
disclaim-related tests.

12 years agoAdd test case to expose a bug with thread creation.
Petter Urkedal [Mon, 19 Sep 2011 06:35:13 +0000 (08:35 +0200)]
Add test case to expose a bug with thread creation.

12 years agoRewrite ChangeLog to contain only major per-release changes description
Ivan Maidanski [Sun, 18 Sep 2011 09:55:04 +0000 (13:55 +0400)]
Rewrite ChangeLog to contain only major per-release changes description
(only starting from 7.2alpha7, the rest remains in the form of commit
log except for versions prior to 7.0alpha9)

12 years agoFix mach_dep.c to include sys/ucontext.h on Mac OS X 10.6.
Ivan Maidanski [Thu, 15 Sep 2011 15:38:30 +0000 (19:38 +0400)]
Fix mach_dep.c to include sys/ucontext.h on Mac OS X 10.6.

* include/private/gc_priv.h (DARWIN): Include AvailabilityMacros.h
(unless MAC_OS_X_VERSION_MAX_ALLOWED already defined).
* mach_dep.c (GC_with_callee_saves_pushed): Include sys/ucontext.h
(instead of ucontext.h) if Mac OS X 10.6 or higher.

12 years agoResolve "comparison of signed and unsigned values" compiler warning.
Ivan Maidanski [Wed, 14 Sep 2011 18:02:00 +0000 (22:02 +0400)]
Resolve "comparison of signed and unsigned values" compiler warning.

* backgraph.c (per_object_helper): Cast "i" local variable to word
(instead of "sz") in a comparison.

12 years ago.gitignore: Ignore tracetest executable.
Ivan Maidanski [Wed, 14 Sep 2011 17:56:25 +0000 (21:56 +0400)]
.gitignore: Ignore tracetest executable.

12 years agoAdd TODO item.
Ivan Maidanski [Wed, 14 Sep 2011 17:55:22 +0000 (21:55 +0400)]
Add TODO item.

12 years agoReplace ARGSUSED comment-based annotation with GCC 'unused' attribute.
Ivan Maidanski [Wed, 14 Sep 2011 17:52:49 +0000 (21:52 +0400)]
Replace ARGSUSED comment-based annotation with GCC 'unused' attribute.
Turn on unused-parameter checking for GCC.

* alloc.c (GC_try_to_collect_general): Add GC_ATTR_UNUSED attribute
to an argument.
* tests/test.c (tiny_reverse_test, thr_run_one_test): Likewise.
* backgraph.c (reset_back_edge, update_max_height): Replace ARGSUSED
annotation with GC_ATTR_UNUSED attribute for some arguments.
* checksums.c (GC_add_block): Likewise.
* dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change,
GC_check_heap_block): Likewise.
* finalize.c (GC_null_finalize_mark_proc): Likewise.
* gcj_mlc.c (GC_gcj_fake_mark_proc): Likewise.
* mark.c (GC_noop, clear_marks_for_block, GC_mark_and_push): Likewise.
* mark_rts.c (GC_push_conditional_with_exclusions,
GC_push_current_stack): Likewise.
* misc.c (GC_default_oom_fn, GC_do_blocking_inner): Likewise.
* os_dep.c (GC_fault_handler_openbsd, GC_fault_handler,
GC_remove_protection, GC_page_was_dirty, GC_page_was_ever_dirty):
Likewise.
* pthread_stop_world.c (GC_suspend_handler, GC_suspend_handler_inner):
Likewise.
* pthread_support.c (GC_do_blocking_inner): Likewise.
* stubborn.c (GC_change_stubborn, GC_end_stubborn_change): Likewise.
* tests/test.c (fail_proc1): Likewise.
* typd_mlc.c (GC_array_mark_proc): Likewise.
* win32_threads.c (GC_do_blocking_inner, DllMain): Likewise.
* include/private/gc_priv.h (GC_ATTR_UNUSED): Define new macro.
* cordxtra.c (CORD_ATTR_UNUSED): Likewise.
* cordxtra.c (CORD_nul_func, CORD_lf_close_proc): Replace ARGSUSED
annotation with CORD_ATTR_UNUSED attribute for an argument.
* mach_dep.c (GC_clear_stack_inner): Remove ARGSUSED annotation and
use "limit" argument in the function (to suppress compiler warning).
* misc.c (GC_clear_stack_inner): Remove ARGSUSED.
* tests/threadkey_test.c (on_thread_exit_inner, on_thread_exit):
Use all function arguments (to suppress compiler warning).
* configure.ac (CFLAGS): Remove "-Wno-unused-parameter" option.

12 years agoAdd TODO item.
Ivan Maidanski [Wed, 14 Sep 2011 15:20:07 +0000 (19:20 +0400)]
Add TODO item.

12 years agoMove "cord" library tests to "cord/tests" folder.
Ivan Maidanski [Wed, 14 Sep 2011 14:51:08 +0000 (18:51 +0400)]
Move "cord" library tests to "cord/tests" folder.

* cord/cordtest.c, cord/de.c, cord/de_win.c, cord/de_cmds.h,
cord/de_win.h: Move to cord/tests folder.
* cord/de_win.RC: Move ad rename to cord/tests/de_win.rc.
* .gitignore: Add cord/tests/de_win.res file.
* BCC_MAKEFILE (cord/de.obj, cord/de_win.obj, cord/de_win.res):
Rename (targets and source moved to cord/tests).
* NT_MAKEFILE (cord/de.obj, cord/de_win.obj): Likewise.
* CMakeLists.txt (cord): Rename cord/de.c, cord/de_win.c (source moved
to cord/tests).
* EMX_MAKEFILE (cord/cordtest.exe, cord/de.exe): Rename
cord/cordtest.c, cord/de.c to cord/tests (source moved to cord/tests).
* Makefile.direct, Makefile.dj (cord/cordtest, cord/de): Likewise.
* OS2_MAKEFILE (cord/cordtest.exe): Likewise.
* SMakefile.amiga (cord/cordtest.o): Likewise.
* Makefile.direct, Makefile.dj (CORD_SRCS): Rename cord/cordtest.c,
cord/de.c, cord/de_cmds.h, cord/de_win.c, cord/de_win.h,
cord/de_win.rc (moved to cord/tests).
* NT_MAKEFILE, NT_STATIC_THREADS_MAKEFILE,
NT_X64_STATIC_THREADS_MAKEFILE, NT_X64_THREADS_MAKEFILE
(cord/de_win.res, cord/de.exe): Move cord/de.obj, cord/de_win.obj to
cord/tests.
* cord/cord.am (EXTRA_DIST): Move cordtest.c, de.c, de_cmds.h,
de_win.h, de_win.c, de_win.rc to cord/tests.
* doc/README.cords: Update (regarding de.c file move).
* gc.mak (SOURCE): Move de_win.c, de.c, de_win.rc to cord/tests.

12 years agoRemove cordtest from "cord" library.
Ivan Maidanski [Wed, 14 Sep 2011 14:27:30 +0000 (18:27 +0400)]
Remove cordtest from "cord" library.

* cord/cord.am (libcord_la_SOURCES): Remove cordtest.c from libcord.

12 years agoFix Makefile.direct after Makefile removal from package.
Ivan Maidanski [Wed, 14 Sep 2011 14:14:59 +0000 (18:14 +0400)]
Fix Makefile.direct after Makefile removal from package.

* .gitignore: Add "base_lib", "c++", "gc.a" files.
* Makefile.direct (Makefile): Add rule to create (or overwrite)
Makefile from Makefile.direct file.
* Makefile.direct (clean): Remove "base_lib", "c++" files as well.

12 years ago.gitignore: Ignore object, exe files in subfolders; ignore de_win.res.
Ivan Maidanski [Wed, 14 Sep 2011 12:35:24 +0000 (16:35 +0400)]
.gitignore: Ignore object, exe files in subfolders; ignore de_win.res.

12 years agoAdjust scripts after Makefile removal from package.
Ivan Maidanski [Wed, 14 Sep 2011 11:06:29 +0000 (15:06 +0400)]
Adjust scripts after Makefile removal from package.

* Makefile.direct (OTHER_FILES): Remove Makefile.
* Makefile.dj (OTHER_FILES): Likewise.
* Makefile.direct (dist gc.tar): Do not backup old auto-generated
Makefile.
* Makefile.dj: Remove comment about Makefile.DLLs.
* README: Update (about Makefile.direct).
* doc/README.autoconf: Likewise.
* doc/simple_example.html: Likewise.
* doc/simple_example.html (sample): Remove outdated comment for
GC_INIT.

12 years agoAdd TODO item.
Ivan Maidanski [Wed, 14 Sep 2011 07:34:18 +0000 (11:34 +0400)]
Add TODO item.

12 years agoMove and rename "callprocs" utility to tools/callprocs.sh.
Ivan Maidanski [Wed, 14 Sep 2011 07:32:59 +0000 (11:32 +0400)]
Move and rename "callprocs" utility to tools/callprocs.sh.

* callprocs: Move/rename to tools/callprocs.sh.
* Makefile.am (dist_noinst_SCRIPTS): Remove.
* Makefile.am (EXTRA_DIST): Add tools/callprocs.sh (move from
dist_noinst_SCRIPTS).
* Makefile.direct (OTHER_FILES): Rename callprocs to
tools/callprocs.sh.
* Makefile.dj (OTHER_FILES): Likewise.
* README: Likewise.
* doc/leak.html: Likewise.
* README: Fix a typo.

12 years agoDelete configure.host (move its content to configure.ac).
Ivan Maidanski [Wed, 14 Sep 2011 07:00:23 +0000 (11:00 +0400)]
Delete configure.host (move its content to configure.ac).

* Makefile.am (dist_noinst_SCRIPTS): Remove configure.host.
* Makefile.direct (GNU_BUILD_FILES): Likewise.
* Makefile.am (CONFIG_STATUS_DEPENDENCIES): Remove.
* configure.ac: Put the content of configure.host instead of
including it.
* configure.host: Remove file.

12 years agoAdjust CMakeLists.txt for Cygwin (set CMAKE_LEGACY_CYGWIN_WIN32).
Ivan Maidanski [Tue, 13 Sep 2011 17:13:25 +0000 (21:13 +0400)]
Adjust CMakeLists.txt for Cygwin (set CMAKE_LEGACY_CYGWIN_WIN32).

* CMakeLists.txt (CMAKE_LEGACY_CYGWIN_WIN32): Set to 0 (required for
Cygwin).

12 years agoIncrease tests/test.c max heap size limit (required for Cygwin)
Ivan Maidanski [Tue, 13 Sep 2011 17:09:46 +0000 (21:09 +0400)]
Increase tests/test.c max heap size limit (required for Cygwin)

* tests/test.c (check_heap_stats): Increase max_heap_sz value (for
32-bit targets) from 15M by 1M (as the former is hit sometimes on
Cygwin).

12 years ago.gitignore: Ignore .vcxproj files generated by CMake for VS.
Ivan Maidanski [Tue, 13 Sep 2011 16:17:31 +0000 (20:17 +0400)]
.gitignore: Ignore .vcxproj files generated by CMake for VS.

12 years agoFix CMake build on Cygwin.
Ivan Maidanski [Tue, 13 Sep 2011 10:06:52 +0000 (14:06 +0400)]
Fix CMake build on Cygwin.

* CMakeLists.txt (cygwin): Remove "-D_REENTRANT" definition.
* CMakeLists.txt (cord): Add gdi32 link library.

12 years ago.gitignore: Ignore exe files in tests (produced by CMake).
Ivan Maidanski [Tue, 13 Sep 2011 08:45:12 +0000 (12:45 +0400)]
.gitignore: Ignore exe files in tests (produced by CMake).

12 years agoFix cord/de.c for Cygwin.
Ivan Maidanski [Tue, 13 Sep 2011 08:12:53 +0000 (12:12 +0400)]
Fix cord/de.c for Cygwin.
(Apply commit 57930e5)

* cord/de.c (WIN32): Define also for Cygwin.

12 years agoHOTFIX: Fix gc_cpp.cc for Cygwin (remove duplicate function definition).
Ivan Maidanski [Tue, 13 Sep 2011 08:09:05 +0000 (12:09 +0400)]
HOTFIX: Fix gc_cpp.cc for Cygwin (remove duplicate function definition).

* gc_cpp.cc (operator delete): Do not define for Cygwin since already
defined in include/gc_cpp.h file.

12 years agoRemove non-STDC code and comments.
Ivan Maidanski [Tue, 13 Sep 2011 07:50:42 +0000 (11:50 +0400)]
Remove non-STDC code and comments.

* cord/cordbscs.c (CORD_substr): Remove code for non-STDC compilers.
* include/private/gc_priv.h (clock): Likewise.
* cord/de.c (beep): Replace the K&R-style function definition with
the ANSI C one.
* include/new_gc_alloc.h: Remove comment about expecting STDC
compiler.

12 years ago.gitignore: Add more files generated by CMake.
Ivan Maidanski [Mon, 12 Sep 2011 15:27:55 +0000 (19:27 +0400)]
.gitignore: Add more files generated by CMake.

12 years agoUpdate TODO file.
Ivan Maidanski [Mon, 12 Sep 2011 11:30:23 +0000 (15:30 +0400)]
Update TODO file.

12 years agoDo not define internal GC_parse_map_entry() unless used.
Ivan Maidanski [Sun, 11 Sep 2011 14:53:50 +0000 (18:53 +0400)]
Do not define internal GC_parse_map_entry() unless used.

* include/private/gc_priv.h (GC_parse_map_entry): Declare only if
DYNAMIC_LOADING.
* os_dep.c (GC_parse_map_entry): Define only if DYNAMIC_LOADING or
REDIRECT_MALLOC, or IA64, or INCLUDE_LINUX_THREAD_DESCR.

12 years agoAdd TODO item.
Ivan Maidanski [Sun, 11 Sep 2011 14:07:12 +0000 (18:07 +0400)]
Add TODO item.

12 years agoUpdate TODO.
Ivan Maidanski [Fri, 9 Sep 2011 11:10:54 +0000 (15:10 +0400)]
Update TODO.

12 years agoUpdate TODO file.
Ivan Maidanski [Thu, 8 Sep 2011 11:48:20 +0000 (15:48 +0400)]
Update TODO file.

12 years agoBump libatomic_ops version to 7.3alpha1 (next major release development).
Ivan Maidanski [Thu, 8 Sep 2011 11:47:25 +0000 (15:47 +0400)]
Bump libatomic_ops version to 7.3alpha1 (next major release development).

* README: Change version to 7.3alpha1.
* configure.ac (AC_INIT): Likewise.
* include/gc_version.h (GC_TMP_VERSION_MINOR, GC_TMP_ALPHA_VERSION):
Likewise.

12 years agoAdd TODO item.
Ivan Maidanski [Thu, 8 Sep 2011 10:24:19 +0000 (14:24 +0400)]
Add TODO item.

12 years agoResolve "comparison of signed and unsigned values" compiler warnings.
Ivan Maidanski [Thu, 8 Sep 2011 10:17:26 +0000 (14:17 +0400)]
Resolve "comparison of signed and unsigned values" compiler warnings.

* cord/cordprnt.c (CORD_vsprintf): Cast "prec" and "width" local
variables to size_t.
* dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Change
type of "i" local variable to int.
* pthread_support.c (start_mark_threads): Likewise.
* os_dep.c (GC_repeat_read): Change type of "num_read" to size_t.
* os_dep.c (GC_get_maps): Change type of "result" local variable from
int to ssize_t; cast "result" to size_t in comparison.
* pthread_support.c (GC_remove_all_threads_but_me): Cast "result" to
int.
* pthread_support.c (GC_wait_for_gc_completion): Change type of
"old_gc_no" local variable to word.
* pthread_support.c (GC_lock): Change type of "i" local variable to
unsigned.
* tests/staticrootstest.c (main): Cast sizeof() value to int in
comparisons.

12 years agoOutput extra GCC warnings.
Ivan Maidanski [Thu, 8 Sep 2011 09:54:17 +0000 (13:54 +0400)]
Output extra GCC warnings.

* configure.ac (CFLAGS): Add -Wall -Wextra -Wno-unused-parameter
options (only if GCC).

12 years agoUpdate TODO.
Ivan Maidanski [Thu, 8 Sep 2011 07:51:53 +0000 (11:51 +0400)]
Update TODO.

12 years agoHOTFIX: Always reset fault handler in GC_find_limit_with_bound on exit.
Ivan Maidanski [Wed, 7 Sep 2011 14:00:38 +0000 (18:00 +0400)]
HOTFIX: Always reset fault handler in GC_find_limit_with_bound on exit.

* os_dep.c (GC_find_limit_with_bound): Inside loop, set result local
volatile variable and do break instead of return (this also suppresses
compiler warning about the potential clobbering of "bound" variable
by setjmp).

12 years agoUpdate TODO.
Ivan Maidanski [Wed, 7 Sep 2011 13:36:48 +0000 (17:36 +0400)]
Update TODO.

12 years agoHOTFIX: Remove locking in API GC_get_bytes_since_gc and friends.
Ivan Maidanski [Wed, 7 Sep 2011 13:35:22 +0000 (17:35 +0400)]
HOTFIX: Remove locking in API GC_get_bytes_since_gc and friends.
Add GC_get_heap_usage_safe() to API as a thread-safe alternative to
GC_get_bytes_since_gc and friends.
Remove newly-added lock-free GC_get_heap_size_inner and
GC_get_free_bytes_inner from API.

* include/gc.h (GC_get_heap_size, GC_get_free_bytes,
GC_get_unmapped_bytes, GC_get_bytes_since_gc, GC_get_total_bytes):
Refine comment.
* include/gc.h (GC_HAVE_GET_HEAP_USAGE_SAFE): New macro.
* include/gc.h (GC_get_heap_usage_safe): New API function.
* misc.c (GC_get_heap_usage_safe): Likewise.
* include/gc_mark.h (GC_get_heap_size_inner, GC_get_free_bytes_inner):
Remove API function.
* misc.c (GC_get_heap_size_inner, GC_get_free_bytes_inner): Likewise.
* misc.c (GC_get_heap_size): Add comment.
* misc.c (GC_get_heap_size, GC_get_free_bytes, GC_get_unmapped_bytes,
GC_get_bytes_since_gc, GC_get_total_bytes): Remove locking.
* misc.c (GC_get_unmapped_bytes): Do not test USE_MUNMAP (not needed
after locking removal).
* misc.c (GC_get_bytes_since_gc, GC_get_total_bytes): Cast result to
size_t.

12 years agoRefine API GC setters and getter comments regarding locking.
Ivan Maidanski [Tue, 6 Sep 2011 14:25:04 +0000 (18:25 +0400)]
Refine API GC setters and getter comments regarding locking.

* include/gc_mark.h (GC_set_start_callback): Refine comment (the
function acquires the GC lock).
* include/gc.h (GC_set_all_interior_pointers, GC_set_stop_func,
GC_get_stack_base): Likewise.
* include/gc.h (GC_get_version, GC_get_gc_no, GC_get_parallel,
GC_set_find_leak, GC_get_all_interior_pointers,
GC_get_dont_precollect, GC_get_pages_executable, GC_set_max_heap_size,
GC_set_force_unmap_on_gcollect): Refine comment (the function is
lock-free).

12 years agoAdd TODO (and FIXME) items.
Ivan Maidanski [Thu, 1 Sep 2011 18:28:07 +0000 (22:28 +0400)]
Add TODO (and FIXME) items.

12 years agoRemove resolved FIXME in tests.am script.
Ivan Maidanski [Wed, 31 Aug 2011 16:07:31 +0000 (20:07 +0400)]
Remove resolved FIXME in tests.am script.
(The stated FIXME no longer in force.)

* tests/tests.am: Remove ancient FIXME about trace_test that it does
not work on MacOS X.

12 years agoFIX: MinGW/MingwCE: Use CreateThread in initsecondarythread test and
Ivan Maidanski [Wed, 31 Aug 2011 15:01:42 +0000 (19:01 +0400)]
FIX: MinGW/MingwCE: Use CreateThread in initsecondarythread test and
thread_leak_test.

* tests/initsecondarythread.c: Include windows.h instead of pthread.h
unless GC_PTHREADS.
* tests/thread_leak_test.c: Likewise.
* tests/initsecondarythread.c (thread): Use WINAPI and set return
type to DWORD unless GC_PTHREADS.
* tests/thread_leak_test.c (test): Likewise.
* tests/initsecondarythread.c (main): Use HANDLE, CreateThread and
WaitForSingleObject instead of pthread_t, pthread_create and
pthread_join, respectively, unless GC_PTHREADS.
* tests/thread_leak_test.c (main): Likewise.

12 years agoCheck pthread_create/join result in initsecondarythread test.
Ivan Maidanski [Wed, 31 Aug 2011 10:19:34 +0000 (14:19 +0400)]
Check pthread_create/join result in initsecondarythread test.

* tests/initsecondarythread.c (GC_NO_THREAD_REDIRECTS): Add comment.
* tests/initsecondarythread.c: Include stdio.h.
* tests/initsecondarythread.c (thread): Cast result of malloc to void;
return arg parameter instead of NULL (to suppress compiler warnings).
* tests/initsecondarythread.c (main): Define "code" local variable;
store result of pthread_create and pthread_join to "code" variable;
exit application with an error code (with the corresponding error
message) if pthread_create or pthread_join fails.

12 years agoAdd info that getcontext() resets FPE mask no longer on Linux/x86_64.
Ivan Maidanski [Wed, 31 Aug 2011 04:13:17 +0000 (08:13 +0400)]
Add info that getcontext() resets FPE mask no longer on Linux/x86_64.

* include/private/gcconfig.h (GETCONTEXT_FPU_EXCMASK_BUG): Add FIXME
that this is no longer needed with the recent GLibC.

12 years agoUpdate AUTHORS file - now it lists most contributors.
Ivan Maidanski [Thu, 25 Aug 2011 15:42:06 +0000 (19:42 +0400)]
Update AUTHORS file - now it lists most contributors.

12 years agoMove information about the authors and their emails from the source
Ivan Maidanski [Thu, 25 Aug 2011 08:42:13 +0000 (12:42 +0400)]
Move information about the authors and their emails from the source
files to AUTHORS file. (This information could also be observed
via "git log" or by looking into the original version of a file.)

* doc/README.DGUX386: Remove original-author and modified-by
information (as well as email and time-stamp) from the file.
* doc/README.Mac: Ditto.
* doc/README.amiga: Ditto.
* doc/README.cords: Ditto.
* doc/README.darwin: Ditto.
* doc/README.dj: Ditto.
* doc/README.ews4800: Ditto.
* doc/README.win32: Ditto.
* doc/barrett_diagram: Ditto.
* include/private/gcconfig.h: Ditto.
* tests/initsecondarythread.c: Ditto.
* AUTHORS: Add authors information (with emails).
* doc/README.Mac: Remove non Lattin-1 characters.
* README: Update email to  sending bugs information.
* doc/README.Mac: Expand all tabs to spaces; remove trailing spaces
at EOLn.
* doc/README.amiga: Ditto.
* doc/barrett_diagram: Ditto.

12 years agoMove asm machine-dependent files to "src" folder.
Ivan Maidanski [Thu, 25 Aug 2011 08:11:42 +0000 (12:11 +0400)]
Move asm machine-dependent files to "src" folder.

* .gitignore: Add entries from "src" folder; add auto-generated files
by CMake; allow a suffix for "libatomic_ops" folder.
* Makefile.direct (SRCS, mach_dep.o): Move sparc_mach_dep.S,
sparc_sunos4_mach_dep.s, sparc_netbsd_mach_dep.s,
ia64_save_regs_in_stack.s to "src" directory.
* Makefile.dj (SRCS): Ditto.
* configure.ac (machdep): Move sparc_mach_dep.lo,
sparc_netbsd_mach_dep.lo, ia64_save_regs_in_stack.lo to "src" folder.
* PCR-Makefile (mach_dep.o): Remove "if_mach" statement for MIPS.
* PCR-Makefile (if_mach, if_not_there): Remove rules.
* gc.mak (CPP_PROJ): Prefix libatomic_ops folder with "./".

12 years agoMove build tools sources from "extra" to "tools" folder.
Ivan Maidanski [Thu, 25 Aug 2011 06:21:19 +0000 (10:21 +0400)]
Move build tools sources from "extra" to "tools" folder.

* EMX_MAKEFILE (setjmp_test): Move setjmp_t.c to "tools" folder.
* Makefile.am (EXTRA_DIST): Move add_gc_prefix.c, gcname.c,
if_mach.c, if_not_there.c, setjmp_t.c  and threadlibs.c to "tools"
folder.
* Makefile.direct (SRCS, OTHER_FILES, if_mach, threadlibs,
if_not_there, setjmp_test, add_gc_prefix, gcname): Ditto.
* Makefile.dj (SRCS, OTHER_FILES, if_mach, threadlibs, if_not_there,
setjmp_test, add_gc_prefix): Ditto.
* PCR-Makefile (if_mach, if_not_there): Ditto.
* SMakefile.amiga (setjmp_t): Ditto.
* doc/simple_example.html: Change folder name for threadlibs.c file.
* EMX_MAKEFILE: Remove trailing spaces at EOLn.
* SMakefile.amiga: Ditto.

12 years agoRemove information about the authors from the source files.
Ivan Maidanski [Wed, 24 Aug 2011 20:16:06 +0000 (00:16 +0400)]
Remove information about the authors from the source files.
(This information could be observed via "git log" or by looking into
the original version of a file.)

* Makefile.am: Remove original-author and modified-by information
(as well as a time-stamp) from the file header.
* configure.ac: Ditto.
* cord/cordbscs.c: Ditto.
* cord/cordprnt.c: Ditto.
* cord/cordxtra.c: Ditto.
* cord/de.c: Ditto.
* cord/de_cmds.h: Ditto.
* cord/de_win.h: Ditto.
* doc/README.arm.cross: Ditto.
* doc/doc.am: Ditto.
* dyn_load.c: Ditto.
* gc_cpp.cc: Ditto.
* gc_dlopen.c: Ditto.
* include/cord.h: Ditto.
* include/include.am: Ditto.
* include/private/cord_pos.h: Ditto.
* include/private/gc_hdrs.h: Ditto.
* include/weakpointer.h: Ditto.
* m4/gc_set_version.m4: Ditto.
* tests/test_cpp.cc: Ditto.
* cord/cordprnt.c: Fix a typo in a comment.
* AUTHORS: Add authors.
* cord/cordprnt.c: Expand all tabs to spaces; remove trailing spaces
at EOLn.
* cord/de.c: Ditto.
* cord/de_cmds.h: Ditto.
* cord/de_win.c: Ditto.
* cord/de_win.h: Ditto.
* doc/README.arm.cross: Ditto.
* include/private/cord_pos.h: Ditto.
* include/weakpointer.h: Ditto.
* m4/gc_set_version.m4: Ditto.

12 years agoRemove binary icon file for de_win.
Ivan Maidanski [Wed, 24 Aug 2011 10:17:55 +0000 (14:17 +0400)]
Remove binary icon file for de_win.

* cord/de_win.ICO: Remove.
* cord/de_win.RC (ABOUTBOX): Comment out ICON usage.
* cord/de_win.RC (DE ICON): Comment out.
* Makefile.direct (CORD_SRCS): Remove de_win.RC; wrap long line.
* Makefile.dj (CORD_SRCS): Ditto.
* Makefile.dj (OTHER_FILES): Remove missing old SCoptions.amiga
and cord/SMakefile.amiga files.
* cord/cord.am (EXTRA_DIST): Remove de_win.RC.
* cord/cord.am: Expand all tabs to spaces.

12 years agoRemove binary project file for old Macintosh.
Ivan Maidanski [Wed, 24 Aug 2011 09:57:34 +0000 (13:57 +0400)]
Remove binary project file for old Macintosh.

* MacProjects.sit.hqx: Remove.
* Makefile.am (EXTRA_DIST): Remove MacProjects.sit.hqx.
* Makefile.direct (OTHER_FILES): Ditto.
* Makefile.dj (OTHER_FILES): Ditto.

12 years agoRemove obsolete unused asm files for ALPHA, SGI, ULTRIX, RS6000.
Ivan Maidanski [Wed, 24 Aug 2011 09:50:46 +0000 (13:50 +0400)]
Remove obsolete unused asm files for ALPHA, SGI, ULTRIX, RS6000.

* alpha_mach_dep.S: Ditto.
* mips_sgi_mach_dep.s: Ditto.
* mips_ultrix_mach_dep.s: Ditto.
* rs6000_mach_dep.s: Ditto.
* Makefile.am (EXTRA_libgc_la_SOURCES): Remove alpha_mach_dep.S,
mips_sgi_mach_dep.s, mips_ultrix_mach_dep.s and rs6000_mach_dep.s.
* Makefile.direct (SRCS): Ditto.
* Makefile.dj (SRCS): Ditto.
* Makefile.direct (mach_dep.o): Remove mips_sgi_mach_dep.s,
mips_ultrix_mach_dep.s, rs6000_mach_dep.s from the dependencies.
* Makefile.dj (mach_dep.o): Ditto.
* Makefile.dj (mach_dep.o): Remove all "if_mach" statements (since
the target is x86).
* PCR-Makefile (mach_dep.o): Remove rs6000_mach_dep.s from the
dependencies; remove all "if_mach" statements except for MIPS.

12 years agoRemove references to old missing gc_alloc.h and gc_local_alloc.h files.
Ivan Maidanski [Wed, 24 Aug 2011 09:36:53 +0000 (13:36 +0400)]
Remove references to old missing gc_alloc.h and gc_local_alloc.h files.
Remove unused HPUX GC_test_and_clear implementation.

* hpux_test_and_clear.s: Remove.
* Makefile.am (EXTRA_DIST): Remove hpux_test_and_clear.s.
* Makefile.direct (SRCS): Ditto.
* Makefile.dj (SRCS): Ditto.
* Makefile.dj (SRCS): Remove missing gcc_support.c,
include/gc_alloc.h, include/gc_local_alloc.h.
* doc/gcdescr.html: Remove information about gc_local_alloc.h.
* doc/gcinterface.html: Ditto.
* doc/scale.html: Ditto.
* doc/gcinterface.html: Remove information about gc_alloc.h.
* tests/test_cpp.cc: Don't include missing old gc_alloc.h (include
new_gc_alloc.h instead); don't test __GNUC__.
* tests/test_cpp.cc (main): Use gc_alloc class instead of alloc (don't
test __GNUC__).
* windows-untested/vc60/gc.dsp (SOURCE): Don't include missing
gc_alloc.h, gc_local_alloc.h.
* windows-untested/vc60/libgc.dsp (SOURCE): Ditto.
* windows-untested/vc70/gc.vcproj (Header Files): Ditto.
* windows-untested/vc70/libgc.vcproj (Header Files): Ditto.
* windows-untested/vc71/gc.vcproj (Header Files): Ditto.
* windows-untested/vc71/libgc.vcproj (Header Files): Ditto.

12 years agoMove README and README.contributors to the project base directory.
Ivan Maidanski [Tue, 23 Aug 2011 11:37:15 +0000 (15:37 +0400)]
Move README and README.contributors to the project base directory.
Rename README.contributors to AUTHORS.

* doc/README: Move to the base folder.
* doc/README.contributors: Ditto.
* doc/README.contributors: Rename to AUTHORS.
* Makefile.direct (DOC_FILES): Rename doc/README to README;
rename doc/README.contributors to AUTHORS.
* Makefile.dj (OTHER_FILES): Ditto.
* README.QUICK: Ditto.
* doc/doc.am (dist_pkgdata_DATA): Ditto.
* include/gc_version.h: Ditto.
* Makefile.dj (OTHER_FILES): Wrap long lines.
* README.QUICK: Fix gc_version.h name.
* doc/doc.am (dist_pkgdata_DATA): Sort entries alphabetically.
* doc/doc.am: Expand all tabs to spaces.

12 years agoRemove the ancient non-integrated patches from README.DGUX386 file.
Ivan Maidanski [Mon, 22 Aug 2011 19:12:14 +0000 (23:12 +0400)]
Remove the ancient non-integrated patches from README.DGUX386 file.

* doc/README.DGUX386: Fix a typo.
* doc/README.DGUX386: Remove patches for ltconfig and ltmain.sh;
add a note about the removal (the patches could be viewed via
"git diff" for this commit).

13 years agoRemove gc_amiga_redirects.h (included internally) from public headers.
Ivan Maidanski [Mon, 22 Aug 2011 11:49:57 +0000 (15:49 +0400)]
Remove gc_amiga_redirects.h (included internally) from public headers.

* Makefile.direct (SRCS): Remove gc_amiga_redirects.h.
* include/include.am (pkginclude_HEADERS): Ditto.
* windows-untested/vc60/gc.dsp (SOURCE): Ditto.
* windows-untested/vc60/libgc.dsp (SOURCE): Ditto.
* windows-untested/vc70/gc.vcproj (Header Files): Ditto.
* windows-untested/vc70/libgc.vcproj (Header Files): Ditto.
* windows-untested/vc71/gc.vcproj (Header Files): Ditto.
* windows-untested/vc71/libgc.vcproj (Header Files): Ditto.
* include/gc.h: Insert the contents of gc_amiga_redirects.h instead
of including it (only if _AMIGA and not GC_AMIGA_MAKINGLIB).
* include/gc.h (GC_amiga_realloc, GC_amiga_set_toany): Remove
"extern" keyword.
* include/gc.h (GC_amiga_allocwrapper_do): Add GC_CALL to the function
argument.
* include/gc.h (GC_amiga_realloc, GC_amiga_set_toany,
GC_amiga_allocwrapper_do): Remove identifiers for arguments from the
declaration.

13 years agoMerge branch 'master' of github.com:ivmai/bdwgc
Ivan Maidanski [Sun, 21 Aug 2011 07:58:44 +0000 (11:58 +0400)]
Merge branch 'master' of github.com:ivmai/bdwgc

13 years agoResolve "comparison of signed and unsigned values" compiler warnings.
Ivan Maidanski [Sun, 21 Aug 2011 07:45:57 +0000 (11:45 +0400)]
Resolve "comparison of signed and unsigned values" compiler warnings.

* allchblk.c (GC_allochblk_nth): Cast MAX_BLACK_LIST_ALLOC and
HBLKSIZE to signed_word.
* mallocx.c (GC_generic_malloc_many): Cast my_bytes_allocd to word.
* mark.c (GC_do_local_mark): Cast the result of local_top minus
local_mark_stack to word (since is non-negative).
* misc.c (GC_base): Declare sz as unsigned word.
* misc.c (GC_enable_incremental): Cast bytes_written to size_t in
comparison to len.
* obj_map.c (GC_initialize_offsets): Declare 'i' as unsigned.
* os_dep.c (GC_or_pages): Ditto.
* typd_mlc.c (GC_init_explicit_typing): Ditto.
* ptr_chck.c (GC_is_visible): Cast the result of p minus base to word.
* typd_mlc.c (GC_make_descriptor): Cast last_set_bit to word (since
non-negative) when compared to BITMAP_BITS.

13 years ago/cygdrive/c/temp/log
Ivan Maidanski [Sun, 21 Aug 2011 07:45:57 +0000 (11:45 +0400)]
/cygdrive/c/temp/log

13 years agoIn .gitignore, remove trailing slash for libatomic_ops directory
Ivan Maidanski [Fri, 19 Aug 2011 07:36:43 +0000 (11:36 +0400)]
In .gitignore, remove trailing slash for libatomic_ops directory
(otherwise libatomic_ops is not ignored if it is a symbolic link).

13 years agoMerge pull request #2 from paurkedal/t/build-aug-14
Ivan Maidanski [Mon, 15 Aug 2011 08:50:22 +0000 (01:50 -0700)]
Merge pull request #2 from paurkedal/t/build-aug-14

Use pkg-config to pick up libatomic_ops, etc.

13 years agoUse pkg-config to pick up libatomic_ops, etc.
Petter Urkedal [Sun, 14 Aug 2011 10:57:27 +0000 (12:57 +0200)]
Use pkg-config to pick up libatomic_ops, etc.

* configure.ac: Remove checks for ar and ranlib.
* configure.ac: Replace AC_CHECK_HEADER with PKG_CHECK_MODULES when
checking for libatomic_ops.  The macro sets the appropriate flags, so
simplify accordingly.
* Makefile.am, configure.ac: Set ATOMIC_OPS_CFLAGS in configure.ac
instead of conditionally doing it in Makefile.am, to be more consistent
with the pkg-config case.
* configure.ac: Fix a typo and some phrases.

13 years agoIgnore libatomic_ops folder by Git.
Ivan Maidanski [Sun, 14 Aug 2011 07:05:39 +0000 (11:05 +0400)]
Ignore libatomic_ops folder by Git.

13 years agoMerge pull request #1 from paurkedal/t/ao-detect
Ivan Maidanski [Fri, 12 Aug 2011 08:37:34 +0000 (01:37 -0700)]
Merge pull request #1 from paurkedal/t/ao-detect

Adjust after removal of libatomic_ops from the source tree.

13 years agoAdjust after removal of libatomic_ops from the source tree.
Petter Urkedal [Thu, 11 Aug 2011 20:04:06 +0000 (22:04 +0200)]
Adjust after removal of libatomic_ops from the source tree.

configure.ac: Since we no longer bundle libatomic_ops, we must check for
the sub-directory before using it, in case we didn't find an installed
version.
Makefile.am: Don't include libatomic_ops in the distribution.

13 years agoSupport multi-threading for RTEMS target.
Jie Liu [Tue, 9 Aug 2011 19:30:20 +0000 (23:30 +0400)]
Support multi-threading for RTEMS target.

* configure.ac: Add GC_RTEMS_PTHREADS AH_TEMPLATE and configure
for rtems.
* os_dep.c: Add GC_get_stack_base if GC_RTEMS_PTHREADS for rtems.
* pthread_stop_world.c (GC_stop_init): Add ifdef SA_RESTART.
* pthread_stop_world.c (GC_stop_init): Use sigprocmask for rtems
when defined GC_RTEMS_PTHREADS.
* pthread_support.c: Exclude sys/mman.h for rtems.
* pthread_support.c (GC_thr_init): Set default GC_nprocs (1) for
rtems.
* include/gc_config_macros.h: Define GC_RTEMS_PTHREADS for rtems
pthread and define GC_NO_DLOPEN for rtems.
* include/private/gc_locks.h: Define USE_PTHREAD_LOCKS for rtems.
* include/private/gcconfig.h: Use rtems_get_stack_bottom()
for InitStackBottom; and use SIGUSR1 for SIG_SUSPEND, SIGUSR2
for SIG_THR_RESTART on rtems.
* include/private/thread_local_alloc.h: Use USE_PTHREAD_SPECIFIC
for rtems.
* tests/test.c (Init): Use exit(0) for rtems instead of return.

13 years agoRemove auto-generated files and add them to .gitignore.
Petter Urkedal [Tue, 9 Aug 2011 18:57:48 +0000 (22:57 +0400)]
Remove auto-generated files and add them to .gitignore.

* .gitignore: Add files generated by autoreconf -vif.
* Makefile.in, aclocal.m4, compile, config.guess, config.sub,
configure, depcomp, include/private/config.h.in, install-sh,
ltmain.sh, m4/libtool.m4, m4/ltoptions.m4, m4/ltsugar.m4,
m4/ltversion.m4, m4/lt~obsolete.m4, missing, mkinstalldirs: Remove.

13 years agoRetire ChangeLog in favor of Git commit log; merge with README.changes;
Ivan Maidanski [Tue, 9 Aug 2011 18:34:42 +0000 (22:34 +0400)]
Retire ChangeLog in favor of Git commit log; merge with README.changes;
add TODO file.

* ChangeLog: add note; append the contents of doc/README.changes.
* doc/README.changes: remove.
* Makefile.direct (DOC_FILES): Remove doc/README.changes.
* doc/doc.am (dist_pkgdata_DATA): Ditto.
* doc/README.contributors: Replace doc/README.changes with ChangeLog.
* Makefile.am (EXTRA_DIST): Add TODO.
* Makefile.direct (DOC_FILES): Ditto.
* Makefile.dj (OTHER_FILES): Ditto.
* Makefile.in: Regenerate.

13 years agoReplace .cvsignore files with a project-wide .gitignore file.
Ivan Maidanski [Tue, 9 Aug 2011 17:47:42 +0000 (21:47 +0400)]
Replace .cvsignore files with a project-wide .gitignore file.

* .cvsignore: Replace with .gitignore.
* include/private/.cvsignore: Remove.

13 years ago2011-07-26 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 26 Jul 2011 08:03:09 +0000 (08:03 +0000)]
2011-07-26  Ivan Maidanski <ivmai@mail.ru>

* tests/realloc_test.c: New file.
* tests/tests.am (TESTS, check_PROGRAMS): Add realloc_test.
* .cvsignore: Add realloc_test.
* configure: Regenerate.
* Makefile.in: Ditto.

13 years ago2011-07-14 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 14 Jul 2011 17:20:58 +0000 (17:20 +0000)]
2011-07-14  Ivan Maidanski <ivmai@mail.ru>

* .cvsignore: Add more auto-generated files.

13 years ago2011-07-14 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 14 Jul 2011 13:43:13 +0000 (13:43 +0000)]
2011-07-14  Ivan Maidanski <ivmai@mail.ru>

* new_hblk.c (GC_build_fl): Adjust "h" local variable cast type
when setting obj_link (to prevent compiler warning); reformat the
comment.
* tests/test.c (reverse_test_inner): Use proper type when touching
"b" and "c" local variables (to prevent compiler warning).

13 years ago2011-07-05 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 5 Jul 2011 17:53:24 +0000 (17:53 +0000)]
2011-07-05  Ivan Maidanski <ivmai@mail.ru>

* misc.c (GC_init): Use HOTTER_THAN (instead of STACK_GROWS_DOWN)
for GC_stackbottom assertion.
* os_dep.c (GC_enclosing_mapping): Define only if IA64 or
INCLUDE_LINUX_THREAD_DESCR; make GC_INNER.
* pthread_support.c (GC_enclosing_mapping): Declare (only if
INCLUDE_LINUX_THREAD_DESCR).
* os_dep.c (GC_get_main_stack_base): Don't call pthread_getattr_np
if REDIRECT_MALLOC as the former is observed to call redirected
malloc (while GC is not initialized yet) on some Linux platforms.
* include/private/gc_priv.h (MAX_HEAP_SECTS): Don't use a smaller
value for SMALL_CONFIG if USE_PROC_FOR_LIBRARIES defined.