[m-rev.] for review: upgrade to Boehm GC 7.0 alpha 6 (CVS)

Peter Wang wangp at students.cs.mu.oz.au
Mon Aug 14 21:42:11 AEST 2006


I've omitted the changes for the garbage collector itself.
The full thing is at /home/saturn/wangp/ws_boehm7/gcupgrade_2.diff

Note that this disables inline allocation.

Peter


Estimated hours taken: 5
Branches: main

Upgrade to version 7.0 alpha 6 (CVS 2006-08-14) of the Boehm garbage
collector.  The main reason is that thread-local allocation is not
supported on Solaris in version 6.x of the collector.

boehm_gc/*:
	Merge in changes from the vendor branch.

.README.in:
	Update Boehm GC version number and copyright notice.

Mmake.common.in:
configure.in:
runtime/RESERVED_MACRO_NAMES:
scripts/mgnuc.in:
	Don't define `THREAD_LOCAL_ALLOC' nor `GC_REDIRECT_TO_LOCAL' as
	thread-local allocation is automatically enabled in gc 7.0.

	Consistently use `GC_WIN32_THREADS' and `GC_LINUX_THREADS' as the
	non-prefixed versions of those symbols are deprecated.

	Don't define `NO_SIGNALS' as it is no longer necessary.

runtime/mercury_prof_mem.c:
runtime/mercury_prof_mem.h:
	Update comments mentioning `NO_SIGNALS'.

compiler/compile_target_code.m:
	Make `--inline-alloc' do nothing as inline allocation is currently
	broken in gc 7.0.

runtime/mercury.h:
runtime/mercury_heap.h:
	Include `gc_inline.h' instead of `gc_inl.h' as the latter no longer
	exists.

extras/concurrency/semaphore.m:
library/par_builtin.m:
robdd/bryant.c:
	Replace instances of `GC_PTR' by `void *' as the former no longer
	exists.

runtime/mercury_wrapper.c:
	Remove references to `GC_quiet' which no longer exists.

	Replace uses of `GC_quiet' for the MPS collector by a new variable
	`MR_mps_quiet'.

tools/bootcheck:
	Copy libatomic_ops-related files and directories when copying
	boehm_gc.


Index: Mmake.common.in
===================================================================
RCS file: /home/mercury1/repository/mercury/Mmake.common.in,v
retrieving revision 1.89
diff -u -r1.89 Mmake.common.in
--- Mmake.common.in	3 Aug 2006 06:26:07 -0000	1.89
+++ Mmake.common.in	12 Aug 2006 01:15:06 -0000
@@ -148,8 +148,7 @@
 
 # Additional options to pass to the C compiler when building Boehm-GC for
 # threads.
-BOEHM_CFLAGS_FOR_THREADS = @ENABLE_BOEHM_THREAD_LOCAL_ALLOC@ \
-	@ENABLE_BOEHM_PARALLEL_MARK@
+BOEHM_CFLAGS_FOR_THREADS = @ENABLE_BOEHM_PARALLEL_MARK@
 
 # Do we want to deal with intermodule information when building the library?
 # By default yes, since this way we note immediately when intermodule
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.464
diff -u -r1.464 configure.in
--- configure.in	13 Aug 2006 07:39:07 -0000	1.464
+++ configure.in	14 Aug 2006 04:40:35 -0000
@@ -2483,7 +2483,6 @@
 # Note that changes here may require changes in scripts/ml.in.
 LDFLAGS_FOR_THREADS=
 LD_LIBFLAGS_FOR_THREADS=
-ENABLE_BOEHM_THREAD_LOCAL_ALLOC=
 ENABLE_BOEHM_PARALLEL_MARK=
 case "$host" in
 	*solaris*)
@@ -2497,9 +2496,8 @@
 		# you may also need to make sure that you don't
 		# pass -ansi to gcc.
 		CFLAGS_FOR_THREADS="-DMR_THREAD_SAFE -DLINUX_THREADS \
-			-D_THREAD_SAFE -D_REENTRANT -DGC_REDIRECT_TO_LOCAL"
+			-D_THREAD_SAFE -D_REENTRANT"
 		THREAD_LIBS="-lpthread -ldl"
-		ENABLE_BOEHM_THREAD_LOCAL_ALLOC="-DTHREAD_LOCAL_ALLOC"
 		ENABLE_BOEHM_PARALLEL_MARK="-DPARALLEL_MARK"
 		;;
 
@@ -2507,7 +2505,7 @@
 		THREAD_LIBS=""
 		case "$CC" in
 			*cl* | *CL*)	# cl is the Microsoft C compiler
-				CFLAGS_FOR_THREADS="-DMR_THREAD_SAFE -DWIN32_THREADS /MD"
+				CFLAGS_FOR_THREADS="-DMR_THREAD_SAFE -DGC_WIN32_THREADS /MD"
 				LDFLAGS_FOR_THREADS="/MD"
 				LD_LIBFLAGS_FOR_THREADS="/MD"
 				;;
@@ -2520,7 +2518,7 @@
 		THREAD_LIBS=""
 		case "$CC" in
 			*cl* | *CL*)	# cl is the Microsoft C compiler
-				CFLAGS_FOR_THREADS="-DMR_THREAD_SAFE -DWIN32_THREADS /MD"
+				CFLAGS_FOR_THREADS="-DMR_THREAD_SAFE -DGC_WIN32_THREADS /MD"
 				LDFLAGS_FOR_THREADS="/MD"
 				LD_LIBFLAGS_FOR_THREADS="/MD"
 				;;
@@ -2575,7 +2573,6 @@
 AC_SUBST(THREAD_LIBS)
 AC_SUBST(LDFLAGS_FOR_THREADS)
 AC_SUBST(LD_LIBFLAGS_FOR_THREADS)
-AC_SUBST(ENABLE_BOEHM_THREAD_LOCAL_ALLOC)
 AC_SUBST(ENABLE_BOEHM_PARALLEL_MARK)
 
 #-----------------------------------------------------------------------------#
Index: boehm_gc/Makefile
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/Makefile,v
retrieving revision 1.62
diff -u -r1.62 Makefile
--- boehm_gc/Makefile	21 Apr 2006 01:04:47 -0000	1.62
+++ boehm_gc/Makefile	14 Aug 2006 06:20:10 -0000
@@ -21,7 +21,7 @@
 #	- fjh.
 #-----------------------------------------------------------------------------#
 
-MERCURY_DIR=..
+MERCURY_DIR := $(shell pwd)/..
 LINK_BOEHM_GC_ONLY=yes
 include ../Mmake.common
 
@@ -51,7 +51,7 @@
 # CC=cc $(ABI_FLAG)
 
 # Mercury-specific definition of CC.
-CC=../scripts/mgnuc --grade $(GRADE) --no-ansi --no-check --no-mercury-stdlib-dir
+CC=$(MERCURY_DIR)/scripts/mgnuc --grade $(GRADE) --no-ansi --no-check --no-mercury-stdlib-dir
 
 CXX=g++ $(ABI_FLAG)
 # Needed only for "make c++", which adds the c++ interface
@@ -62,35 +62,42 @@
 #  Under Irix 6, you will have to specify the ABI (-o32, -n32, or -64)
 #  if you use something other than the default ABI on your machine.
 # Mercury-specific AS:
-AS=../scripts/mgnuc --grade $(GRADE) --assemble
+AS=$(MERCURY_DIR)/scripts/mgnuc --grade $(GRADE) --assemble
 
 # Redefining srcdir allows object code for the nonPCR version of the collector
 # to be generated in different directories.
 srcdir= .
 VPATH= $(srcdir)
 
-# CFLAGS= -O -I$(srcdir)/include -DATOMIC_UNCOLLECTABLE -DNO_SIGNALS \
-#	-DNO_EXECUTE_PERMISSION -DSILENT -DALL_INTERIOR_POINTERS
+# Atomic_ops installation directory.  If this doesn't exist, we create
+# it from the included libatomic_ops distribution.
+AO_VERSION=1.2
+AO_SRC_DIR=$(srcdir)/libatomic_ops-$(AO_VERSION)
+AO_INSTALL_DIR=$(srcdir)/libatomic_ops-install
+
+# CFLAGS= -O -I$(srcdir)/include -I$(AO_INSTALL_DIR)/include \
+#	-DATOMIC_UNCOLLECTABLE -DNO_EXECUTE_PERMISSION -DALL_INTERIOR_POINTERS
 
 # To build the parallel collector on Linux, add to the above:
 # -DGC_LINUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC
+# To build the thread-capable preload library that intercepts
+# malloc, add -DGC_USE_DLOPEN_WRAP -DREDIRECT_MALLOC=GC_malloc -fpic
 # To build the parallel collector in a static library on HP/UX,
 # add to the above:
-# -DGC_HPUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC -D_POSIX_C_SOURCE=199506L -mt
+# -DGC_HPUX_THREADS -DTHREAD_LOCAL_ALLOC -D_POSIX_C_SOURCE=199506L -mt
+# FIXME: PARALLEL_MARK currently broken on HP/UX.
 # To build the thread-safe collector on Tru64, add to the above:
 # -pthread -DGC_OSF1_THREADS
 
 # Mercury-specific CFLAGS:
-CFLAGS= -I$(srcdir)/include \
-	-DSILENT -DNO_DEBUGGING -DNO_EXECUTE_PERMISSION \
+CFLAGS= -I$(srcdir)/include -I$(AO_INSTALL_DIR)/include \
+	-DNO_DEBUGGING -DNO_EXECUTE_PERMISSION \
 	$(BOEHM_CFLAGS) $(CFLAGS_FOR_PIC) $(DLL_CFLAGS) $(EXTRA_CFLAGS)
 
 ifeq ($(GC_GRADE),par_gc)
 CFLAGS += $(BOEHM_CFLAGS_FOR_THREADS)
 endif
 
-# Note that the `mgnuc' script also passes -DNO_SIGNALS, unless
-# profiling was enabled (see comments in runtime/mercury_prof_mem.h for why).
 # We need $(CFLAGS_FOR_PIC) because we might be building a shared library.
 
 # HOSTCC and HOSTCFLAGS are used to build executables that will be run as
@@ -107,7 +114,6 @@
 # without optimization.
 
 # These define arguments influence the collector configuration:
-# -DSILENT disables statistics printing, and improves performance.
 # -DFIND_LEAK causes GC_find_leak to be initially set.
 #   This causes the collector to assume that all inaccessible
 #   objects should have been explicitly deallocated, and reports exceptions.
@@ -150,13 +156,6 @@
 #   an object can be recognized.  This can be expensive.  (The padding
 #   is normally more than one byte due to alignment constraints.)
 #   -DDONT_ADD_BYTE_AT_END disables the padding.
-# -DNO_SIGNALS does not disable signals during critical parts of
-#   the GC process.  This is no less correct than many malloc 
-#   implementations, and it sometimes has a significant performance
-#   impact.  However, it is dangerous for many not-quite-ANSI C
-#   programs that call things like printf in asynchronous signal handlers.
-#   This is on by default.  Turning it off has not been extensively tested with
-#   compilers that reorder stores.  It should have been.
 # -DNO_EXECUTE_PERMISSION may cause some or all of the heap to not
 #   have execute permission, i.e. it may be impossible to execute
 #   code from the heap.  Currently this only affects the incremental
@@ -197,9 +196,9 @@
 # -DJAVA_FINALIZATION makes it somewhat safer to finalize objects out of
 #   order by specifying a nonstandard finalization mark procedure  (see
 #   finalize.c).  Objects reachable from finalizable objects will be marked
-#   in a sepearte postpass, and hence their memory won't be reclaimed.
+#   in a separate postpass, and hence their memory won't be reclaimed.
 #   Not recommended unless you are implementing a language that specifies
-#   these semantics.  Since 5.0, determines only only the initial value
+#   these semantics.  Since 5.0, determines only the initial value
 #   of GC_java_finalization variable.
 # -DFINALIZE_ON_DEMAND causes finalizers to be run only in response
 #   to explicit GC_invoke_finalizers() calls.
@@ -208,6 +207,14 @@
 # -DATOMIC_UNCOLLECTABLE includes code for GC_malloc_atomic_uncollectable.
 #   This is useful if either the vendor malloc implementation is poor,
 #   or if REDIRECT_MALLOC is used.
+# -DMARK_BIT_PER_GRANULE requests that a mark bit (or often byte)
+#   be allocated for each allocation granule, as opposed to each object.
+#   This often improves speed, possibly at some cost in space and/or
+#   cache footprint.  Normally it is best to let this decision be
+#   made automatically depending on platform.
+# -DMARK_BIT_PER_OBJ requests that a mark bit be allocated for each
+#   object instead of allocation granule.  The opposiet of
+#   MARK_BIT_PER_GRANULE.
 # -DHBLKSIZE=ddd, where ddd is a power of 2 between 512 and 16384, explicitly
 #   sets the heap block size.  Each heap block is devoted to a single size and
 #   kind of object.  For the incremental collector it makes sense to match
@@ -284,11 +291,16 @@
 #   causes the collector some system and pthread calls in a more transparent
 #   fashion than the usual macro-based approach.  Requires GNU ld, and
 #   currently probably works only with Linux.
-# -DTHREAD_LOCAL_ALLOC defines GC_local_malloc(), GC_local_malloc_atomic()
-#   and GC_local_gcj_malloc().  Needed for gc_gcj.h interface.  These allocate
-#   in a way that usually does not involve acquisition of a global lock.
-#   Currently works only on platforms such as Linux which use pthread_support.c.
-#   Recommended for multiprocessors.
+# -DGC_USE_DLOPEN_WRAP causes the collector to redefine malloc and intercepted
+#   pthread routines with their real names, and causes it to use dlopen
+#   and dlsym to refer to the original versions.  This makes it possible to
+#   build an LD_PRELOADable malloc replacement library.
+# -DTHREAD_LOCAL_ALLOC defines GC_malloc(), GC_malloc_atomic()
+#   and GC_gcj_malloc() to use a per-thread set of free-lists.
+#   These then allocate  in a way that usually does not involve
+#   acquisition of a global lock.  Currently supported only on platforms
+#   such as Linux that use pthread_support.c.  Recommended for multiprocessors.
+#   Requires explicit GC_INIT() call.
 # -DUSE_COMPILER_TLS causes thread local allocation to use compiler-supported
 #   "__thread" thread-local variables.  This is the default in HP/UX.  It
 #   may help performance on recent Linux installations.  (It failed for
@@ -320,6 +332,10 @@
 #   set and collected heap to grow significantly if malloced memory is
 #   somehow getting traced by the collector.  This has no impact on the
 #   generated library; it only affects the test.
+# -DNO_INCREMENTAL cases the gctest program to not invoke the incremental
+#   collector.  This has no impact on the generated library, only on the
+#   test program.  (This is often useful for debugging failures unrelated
+#   to incremental GC.)
 # -DPOINTER_MASK=0x... causes candidate pointers to be ANDed with the
 #   given mask before being considered.  If either this or the following
 #   macro is defined, it will be assumed that all pointers stored in
@@ -330,6 +346,9 @@
 # -DPOINTER_SHIFT=n causes the collector to left shift candidate pointers
 #   by the indicated amount before trying to interpret them.  Applied
 #   after POINTER_MASK. EXPERIMENTAL.  See also the preceding macro.
+# -DENABLE_TRACE enables the GC_TRACE=addr environment setting to do its
+#   job.  By default this is not supported in order to keep the marker as fast
+#   as possible.
 # -DDARWIN_DONT_PARSE_STACK Causes the Darwin port to discover thread
 #   stack bounds in the same way as other pthread ports, without trying to
 #   walk the frames onthe stack.  This is recommended only as a fallback
@@ -341,36 +360,47 @@
 RANLIB= ranlib
 
 
-OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o headers.o mark.o obj_map.o blacklst.o finalize.o new_hblk.o dbg_mlc.o malloc.o stubborn.o checksums.o solaris_threads.o pthread_support.o pthread_stop_world.o darwin_stop_world.o typd_mlc.o ptr_chck.o mallocx.o solaris_pthreads.o gcj_mlc.o specific.o gc_dlopen.o backgraph.o win32_threads.o
-
-CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c new_hblk.c real_malloc.c dyn_load.c dbg_mlc.c malloc.c stubborn.c checksums.c solaris_threads.c pthread_support.c pthread_stop_world.c darwin_stop_world.c typd_mlc.c ptr_chck.c mallocx.c solaris_pthreads.c gcj_mlc.c specific.c gc_dlopen.c backgraph.c win32_threads.c
+OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o \
+  headers.o mark.o obj_map.o blacklst.o finalize.o new_hblk.o dbg_mlc.o  \
+  malloc.o stubborn.o checksums.o pthread_support.o pthread_stop_world.o \
+  darwin_stop_world.o typd_mlc.o ptr_chck.o mallocx.o gcj_mlc.o specific.o \
+  gc_dlopen.o backgraph.o win32_threads.o thread_local_alloc.o
+
+CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c \
+  headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c \
+  new_hblk.c real_malloc.c dyn_load.c dbg_mlc.c malloc.c stubborn.c \
+  checksums.c pthread_support.c pthread_stop_world.c darwin_stop_world.c \
+  typd_mlc.c ptr_chck.c mallocx.c gcj_mlc.c specific.c gc_dlopen.c \
+  backgraph.c win32_threads.c thread_local_alloc.c
 
 CORD_SRCS=  cord/cordbscs.c cord/cordxtra.c cord/cordprnt.c cord/de.c cord/cordtest.c include/cord.h include/ec.h include/private/cord_pos.h cord/de_win.c cord/de_win.h cord/de_cmds.h cord/de_win.ICO cord/de_win.RC
 
 CORD_OBJS=  cord/cordbscs.o cord/cordxtra.o cord/cordprnt.o
 
 SRCS= $(CSRCS) mips_sgi_mach_dep.s rs6000_mach_dep.s alpha_mach_dep.S \
-    sparc_mach_dep.S include/gc.h include/gc_typed.h \
+    sparc_mach_dep.S include/gc.h include/gc_typed.h include/gc_tiny_fl.h \
     include/private/gc_hdrs.h include/private/gc_priv.h \
     include/private/gcconfig.h include/private/gc_pmark.h \
-    include/gc_inl.h include/gc_inline.h include/gc_mark.h \
+    include/gc_inline.h include/gc_mark.h \
     threadlibs.c if_mach.c if_not_there.c gc_cpp.cc include/gc_cpp.h \
     gcname.c include/weakpointer.h include/private/gc_locks.h \
-    gcc_support.c mips_ultrix_mach_dep.s include/gc_alloc.h \
+    mips_ultrix_mach_dep.s \
     include/new_gc_alloc.h include/gc_allocator.h \
     include/javaxfc.h sparc_sunos4_mach_dep.s sparc_netbsd_mach_dep.s \
-    include/private/solaris_threads.h include/gc_backptr.h \
+    include/gc_backptr.h \
     hpux_test_and_clear.s include/gc_gcj.h \
-    include/gc_local_alloc.h include/private/dbg_mlc.h \
-    include/private/specific.h powerpc_darwin_mach_dep.s \
+    include/private/dbg_mlc.h \
+    include/private/specific.h \
     include/leak_detector.h include/gc_amiga_redirects.h \
     include/gc_pthread_redirects.h ia64_save_regs_in_stack.s \
     include/gc_config_macros.h include/private/pthread_support.h \
     include/private/pthread_stop_world.h include/private/darwin_semaphore.h \
-    include/private/darwin_stop_world.h $(CORD_SRCS)
+    include/private/darwin_stop_world.h include/private/thread_local_alloc.h \
+    $(CORD_SRCS)
 
 DOC_FILES= README.QUICK doc/README.Mac doc/README.MacOSX doc/README.OS2 \
 	doc/README.amiga doc/README.cords doc/debugging.html \
+	doc/porting.html doc/overview.html \
 	doc/README.dj doc/README.hp doc/README.linux doc/README.rs6000 \
 	doc/README.sgi doc/README.solaris2 doc/README.uts \
 	doc/README.win32 doc/barrett_diagram doc/README \
@@ -384,25 +414,27 @@
 TESTS= tests/test.c tests/test_cpp.cc tests/trace_test.c \
 	tests/leak_test.c tests/thread_leak_test.c tests/middle.c
 
-GNU_BUILD_FILES= configure.in Makefile.am configure acinclude.m4 \
+GNU_BUILD_FILES= configure.ac Makefile.am configure acinclude.m4 \
 		 libtool.m4 install-sh configure.host Makefile.in \
 		 aclocal.m4 config.sub config.guess \
-		 include/Makefile.am include/Makefile.in \
-		 doc/Makefile.am doc/Makefile.in \
-		 ltmain.sh mkinstalldirs depcomp missing
+		 include/include.am doc/doc.am \
+		 ltmain.sh mkinstalldirs depcomp missing \
+		 cord/cord.am tests/tests.am autogen.sh \
+		 bdw-gc.pc.in compile
 
 OTHER_MAKEFILES= OS2_MAKEFILE NT_MAKEFILE NT_THREADS_MAKEFILE gc.mak \
 		 BCC_MAKEFILE EMX_MAKEFILE WCC_MAKEFILE Makefile.dj \
 		 PCR-Makefile SMakefile.amiga Makefile.DLLs \
-		 digimars.mak Makefile.direct NT_STATIC_THREADS_MAKEFILE
+		 digimars.mak Makefile.direct NT_STATIC_THREADS_MAKEFILE \
+		 configure_atomic_ops.sh
 #	Makefile and Makefile.direct are copies of each other.
 
-OTHER_FILES= Makefile setjmp_t.c callprocs pc_excludes \
+OTHER_FILES= Makefile setjmp_t.c callprocs \
            MacProjects.sit.hqx MacOS.c \
            Mac_files/datastart.c Mac_files/dataend.c \
            Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
            add_gc_prefix.c gc_cpp.cpp \
-	   version.h AmigaOS.c \
+	   version.h AmigaOS.c mscvc_dbg.c include/private/msvc_dbg.h \
 	   $(TESTS) $(GNU_BUILD_FILES) $(OTHER_MAKEFILES)
 
 CORD_INCLUDE_FILES= $(srcdir)/include/gc.h $(srcdir)/include/cord.h \
@@ -418,7 +450,8 @@
 # the SHELL environment variable.
 SHELL= /bin/sh
 
-SPECIALCFLAGS = -I$(srcdir)/include $(CFLAGS_FOR_PIC)
+SPECIALCFLAGS = -I$(srcdir)/include -I$(AO_INSTALL_DIR)/include \
+		$(CFLAGS_FOR_PIC)
 # Alternative flags to the C compiler for mach_dep.c.
 # Mach_dep.c often doesn't like optimization, and it's
 # not time-critical anyway.
@@ -426,6 +459,12 @@
 
 all: gc.a gctest
 
+# if AO_INSTALL_DIR doesn't exist, we assume that it is pointing to
+# the default location, and we need to build
+$(AO_INSTALL_DIR): 
+	CC="$(CC)" $(srcdir)/configure_atomic_ops.sh
+	cd $(AO_SRC_DIR); make CC="$(CC)" install
+
 LEAKFLAGS=$(CFLAGS) -DFIND_LEAK
 
 BSD-pkg-all: bsd-libgc.a bsd-libleak.a
@@ -455,16 +494,18 @@
     $(srcdir)/include/private/gc_hdrs.h $(srcdir)/include/private/gc_locks.h \
     $(srcdir)/include/gc.h $(srcdir)/include/gc_pthread_redirects.h \
     $(srcdir)/include/private/gcconfig.h $(srcdir)/include/gc_typed.h \
-    $(srcdir)/include/gc_config_macros.h $(LIBGC_DLL_H) Makefile
+    $(srcdir)/include/gc_config_macros.h Makefile $(AO_INSTALL_DIR) \
+    $(LIBGC_DLL_H)
 # The dependency on Makefile is needed.  Changing
-# options such as -DSILENT affects the size of GC_arrays,
+# options affects the size of GC_arrays,
 # invalidating all .o files that rely on gc_priv.h
 
-mark.o typd_mlc.o finalize.o ptr_chck.o: $(srcdir)/include/gc_mark.h $(srcdir)/include/private/gc_pmark.h
-
-specific.o pthread_support.o: $(srcdir)/include/private/specific.h
+mark.o typd_mlc.o finalize.o ptr_chck.o: $(srcdir)/include/gc_mark.h \
+					 $(srcdir)/include/private/gc_pmark.h
 
-solaris_threads.o solaris_pthreads.o: $(srcdir)/include/private/solaris_threads.h
+specific.o pthread_support.o thread_local_alloc.o win32_threads.o: \
+	$(srcdir)/include/private/specific.h $(srcdir)/include/gc_inline.h \
+	$(srcdir)/include/private/thread_local_alloc.h
 
 dbg_mlc.o gcj_mlc.o: $(srcdir)/include/private/dbg_mlc.h
 
@@ -488,8 +529,9 @@
 base_lib gc.a: $(OBJS) dyn_load.o $(UTILS)
 	echo > base_lib
 	rm -f dont_ar_1
-	./if_mach SPARC SUNOS5 touch dont_ar_1
-	./if_mach SPARC SUNOS5 $(AR) rus gc.a $(OBJS) dyn_load.o
+	cp $(AO_INSTALL_DIR)/lib/libatomic_ops.a gc.a
+	./if_mach SPARC SOLARIS touch dont_ar_1
+	./if_mach SPARC SOLARIS $(AR) rus gc.a $(OBJS) dyn_load.o
 	./if_mach M68K AMIGA touch dont_ar_1
 	./if_mach M68K AMIGA $(AR) -vrus gc.a $(OBJS) dyn_load.o
 	./if_not_there dont_ar_1 $(AR) ru gc.a $(OBJS) dyn_load.o
@@ -498,8 +540,8 @@
 
 cords: $(CORD_OBJS) cord/cordtest $(UTILS)
 	rm -f dont_ar_3
-	./if_mach SPARC SUNOS5 touch dont_ar_3
-	./if_mach SPARC SUNOS5 $(AR) rus gc.a $(CORD_OBJS)
+	./if_mach SPARC SOLARIS touch dont_ar_3
+	./if_mach SPARC SOLARIS $(AR) rus gc.a $(CORD_OBJS)
 	./if_mach M68K AMIGA touch dont_ar_3
 	./if_mach M68K AMIGA $(AR) -vrus gc.a $(CORD_OBJS)
 	./if_not_there dont_ar_3 $(AR) ru gc.a $(CORD_OBJS)
@@ -522,8 +564,8 @@
 
 c++: gc_cpp.o $(srcdir)/include/gc_cpp.h test_cpp
 	rm -f dont_ar_4
-	./if_mach SPARC SUNOS5 touch dont_ar_4
-	./if_mach SPARC SUNOS5 $(AR) rus gc.a gc_cpp.o
+	./if_mach SPARC SOLARIS touch dont_ar_4
+	./if_mach SPARC SOLARIS $(AR) rus gc.a gc_cpp.o
 	./if_mach M68K AMIGA touch dont_ar_4
 	./if_mach M68K AMIGA $(AR) -vrus gc.a gc_cpp.o
 	./if_not_there dont_ar_4 $(AR) ru gc.a gc_cpp.o
@@ -538,9 +580,9 @@
 # generic shared library version of the collector
 lib$(GC_GRADE).so: $(OBJS) $(UTILS) # dyn_load_sunos53.o
 	rm -f on_sparc_sunos5_so
-	./if_mach SPARC SUNOS5 touch on_sparc_sunos5_so
-	./if_mach SPARC SUNOS5 $(MAKE) dyn_load_sunos53.o
-	./if_mach SPARC SUNOS5 \
+	./if_mach SPARC SOLARIS touch on_sparc_sunos5_so
+	./if_mach SPARC SOLARIS $(MAKE) dyn_load_sunos53.o
+	./if_mach SPARC SOLARIS \
 	$(LINK_SHARED_OBJ) -o lib$(GC_GRADE).so $(OBJS) dyn_load_sunos53.o \
 		-ldl `./threadlibs`
 	./if_not_there on_sparc_sunos5_so $(MAKE) dyn_load.o
@@ -555,7 +597,7 @@
 
 # SunOS5 shared library version of the collector
 sunos5gc.so: $(OBJS) dyn_load_sunos53.o
-	$(CC) -G -o sunos5gc.so $(OBJS) dyn_load_sunos53.o -ldl
+	$(CC) -G -o sunos5gc.so $(OBJS) dyn_load_sunos53.o $(AO_INSTALL_DIR)/lib/libatomic_ops.a -ldl
 	ln sunos5gc.so libgc.so
 
 # Alpha/OSF shared library version of the collector
@@ -573,6 +615,11 @@
 	gcc -shared -o liblinuxgc.so $(OBJS) dyn_load.o
 	ln liblinuxgc.so libgc.so
 
+# Build gctest with dynamic library
+dyn_test:
+	$(CC) $(CFLAGS) -o gctest tests/test.c libgc.so `./threadlibs`
+	./gctest
+
 # Alternative Linux rule.  This is preferable, but is likely to break the
 # Makefile for some non-linux platforms.
 # LIBOBJS= $(patsubst %.o, %.lo, $(OBJS))
@@ -588,20 +635,16 @@
 
 mach_dep.o: $(srcdir)/mach_dep.c $(srcdir)/mips_sgi_mach_dep.s \
 	    $(srcdir)/mips_ultrix_mach_dep.s \
-            $(srcdir)/rs6000_mach_dep.s $(srcdir)/powerpc_darwin_mach_dep.s \
+            $(srcdir)/rs6000_mach_dep.s \
 	    $(srcdir)/sparc_mach_dep.S $(srcdir)/sparc_sunos4_mach_dep.s \
 	    $(srcdir)/ia64_save_regs_in_stack.s \
 	    $(srcdir)/sparc_netbsd_mach_dep.s $(UTILS)
 	rm -f mach_dep.o
-	./if_mach MIPS IRIX5 $(CC) -c -o mach_dep.o $(srcdir)/mips_sgi_mach_dep.s
-	./if_mach MIPS RISCOS $(AS) -o mach_dep.o $(srcdir)/mips_ultrix_mach_dep.s
-	./if_mach MIPS ULTRIX $(AS) -o mach_dep.o $(srcdir)/mips_ultrix_mach_dep.s
-	./if_mach POWERPC DARWIN $(AS) -o mach_dep.o $(srcdir)/powerpc_darwin_mach_dep.s
-	./if_mach ALPHA LINUX $(CC) -c -o mach_dep.o $(srcdir)/alpha_mach_dep.S
-	./if_mach SPARC SUNOS5 $(CC) -c -o mach_dep.o $(srcdir)/sparc_mach_dep.S
-	./if_mach SPARC SUNOS4 $(AS) -o mach_dep.o $(srcdir)/sparc_sunos4_mach_dep.s
-	./if_mach SPARC OPENBSD $(AS) -o mach_dep.o $(srcdir)/sparc_sunos4_mach_dep.s
-	./if_mach SPARC NETBSD $(AS) -o mach_dep.o $(srcdir)/sparc_netbsd_mach_dep.s
+	./if_mach SPARC SOLARIS $(CC) -c -o mach_dep2.o $(srcdir)/sparc_mach_dep.S
+	./if_mach SPARC OPENBSD $(AS) -o mach_dep2.o $(srcdir)/sparc_sunos4_mach_dep.s
+	./if_mach SPARC NETBSD $(AS) -o mach_dep2.o $(srcdir)/sparc_netbsd_mach_dep.s
+	./if_mach SPARC "" $(CC) -c -o mach_dep1.o $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
+	./if_mach SPARC "" ld -r -o mach_dep.o mach_dep1.o mach_dep2.o
 	./if_mach IA64 "" as $(AS_ABI_FLAG) -o ia64_save_regs_in_stack.o $(srcdir)/ia64_save_regs_in_stack.s
 	./if_mach IA64 "" $(CC) -c -o mach_dep1.o $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
 	./if_mach IA64 "" ld -r -o mach_dep.o mach_dep1.o ia64_save_regs_in_stack.o
@@ -647,7 +690,7 @@
 	rm -f cord/de
 	./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES) -lucb `./threadlibs`
 	./if_mach HP_PA HPUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES) -ldld `./threadlibs`
-	./if_mach RS6000 "" $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses
+	./if_mach POWERPC AIX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses
 	./if_mach POWERPC DARWIN $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a
 	./if_mach I386 LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses `./threadlibs`
 	./if_mach ALPHA LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses `./threadlibs`
@@ -680,7 +723,7 @@
 # If an optimized setjmp_test generates a segmentation fault,
 # odds are your compiler is broken.  Gctest may still work.
 # Try compiling setjmp_t.c unoptimized.
-setjmp_test: $(srcdir)/setjmp_t.c $(srcdir)/include/gc.h $(UTILS)
+setjmp_test: $(srcdir)/setjmp_t.c $(srcdir)/include/gc.h $(UTILS) $(AO_INSTALL_DIR)
 	$(CC) $(CFLAGS) -o setjmp_test $(srcdir)/setjmp_t.c
 
 test:  KandRtest cord/cordtest
@@ -697,35 +740,27 @@
 gcname: $(srcdir)/gcname.c $(srcdir)/version.h
 	$(CC) -o gcname $(srcdir)/gcname.c
 
-gc.tar: $(SRCS) $(DOC_FILES) $(OTHER_FILES) add_gc_prefix gcname
+#We assume this is being done from source directory.
+dist gc.tar: $(SRCS) $(DOC_FILES) $(OTHER_FILES) add_gc_prefix gcname
 	cp Makefile Makefile.old
 	cp Makefile.direct Makefile
+	CC=$(CC) ./configure_atomic_ops.sh
+	cd $(AO_SRC_DIR); make dist
+	if test $(srcdir)/libatomic_ops-$(AO_VERSION) = $(AO_SRC_DIR); \
+	then \
+	  mv $(AO_SRC_DIR) $(AO_SRC_DIR).bak ; \
+	  tar xvfz $(AO_SRC_DIR).bak/libatomic_ops-$(AO_VERSION).tar.gz ; \
+	else \
+	  tar xvfz $(AO_SRC_DIR)/libatomic_ops-$(AO_VERSION).tar.gz ; \
+	fi
 	rm -f `./gcname`
 	ln -s . `./gcname`
-	./add_gc_prefix $(SRCS) $(DOC_FILES) $(OTHER_FILES) > /tmp/gc.tar-files
+	./add_gc_prefix $(SRCS) $(DOC_FILES) $(OTHER_FILES) libatomic_ops-$(AO_VERSION) > /tmp/gc.tar-files
 	tar cvfh gc.tar `cat /tmp/gc.tar-files`
 	cp gc.tar `./gcname`.tar
 	gzip `./gcname`.tar
 	rm `./gcname`
 
-pc_gc.tar: $(SRCS) $(OTHER_FILES)
-	tar cvfX pc_gc.tar pc_excludes $(SRCS) $(OTHER_FILES)
-
-floppy: pc_gc.tar
-	-mmd a:/cord
-	-mmd a:/cord/private
-	-mmd a:/include
-	-mmd a:/include/private
-	mkdir /tmp/pc_gc
-	cat pc_gc.tar | (cd /tmp/pc_gc; tar xvf -)
-	-mcopy -tmn /tmp/pc_gc/* a:
-	-mcopy -tmn /tmp/pc_gc/cord/* a:/cord
-	-mcopy -mn /tmp/pc_gc/cord/de_win.ICO a:/cord
-	-mcopy -tmn /tmp/pc_gc/cord/private/* a:/cord/private
-	-mcopy -tmn /tmp/pc_gc/include/* a:/include
-	-mcopy -tmn /tmp/pc_gc/include/private/* a:/include/private
-	rm -r /tmp/pc_gc
-
 gc.tar.Z: gc.tar
 	compress gc.tar
 
@@ -745,6 +780,19 @@
 gctest_irix_dyn_link: tests/test.o libirixgc.so
 	$(CC) -L$(ABSDIR) -o gctest_irix_dyn_link tests/test.o -lirixgc
 
+# The following appear to be dead, especially since libgc_globals.h
+# is apparently lost.
+test_dll.o: tests/test.c libgc_globals.h
+	$(CC) $(CFLAGS) -DGC_USE_DLL -c tests/test.c -o test_dll.o
+
+test_dll: test_dll.o libgc_dll.a libgc.dll
+	$(CC) test_dll.o -L$(ABSDIR) -lgc_dll -o test_dll
+
+SYM_PREFIX-libgc=GC
+
+# Uncomment the following line to build a GNU win32 DLL
+# include Makefile.DLLs
+
 reserved_namespace: $(SRCS)
 	for file in $(SRCS) tests/test.c tests/test_cpp.cc; do \
 		sed s/GC_/_GC_/g < $$file > tmp; \
Index: boehm_gc/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/Mmakefile,v
retrieving revision 1.28
diff -u -r1.28 Mmakefile
--- boehm_gc/Mmakefile	19 Oct 2004 06:01:36 -0000	1.28
+++ boehm_gc/Mmakefile	14 Aug 2006 03:45:53 -0000
@@ -12,7 +12,7 @@
 
 MAIN_TARGET=lib$(GC_GRADE)
 
-MERCURY_DIR=..
+MERCURY_DIR := $(shell pwd)/..
 LINK_BOEHM_GC_ONLY=yes
 include $(MERCURY_DIR)/Mmake.common
 
@@ -97,9 +97,9 @@
 .PHONY: install
 install: install_headers install_lib install_dll
 
-# As well as installing gc.h (and hence gc_pthread_redirects.h and
-# gc_local_alloc.h), we also install gc_inl.h (and hence gc_priv.h, gc_mark.h,
-# gc_hdrs.h, gc_locks.h, and gcconfig.h), for use with `-DINLINE_ALLOC'.
+# As well as installing gc.h (and hence gc_pthread_redirects.h), we also
+# install gc_inline.h (and hence gc_tiny_fl.h, gc_priv.h, gc_mark.h,
+# gc_hdrs.h, gc_locks.h, and gcconfig.h) for use with `-DINLINE_ALLOC'.
 # If we're using DLLs, we also want libgc_dll.h and libgc_globals.h.
 #
 # IMPORTANT NOTE: the following two lists must include all the header files
@@ -113,8 +113,8 @@
 	include/gc.h  \
 	include/gc_config_macros.h \
 	include/gc_pthread_redirects.h \
-	include/gc_local_alloc.h \
-	include/gc_inl.h \
+	include/gc_inline.h \
+	include/gc_tiny_fl.h \
 	include/gc_mark.h \
 	$(LIBGC_DLL_H) $(LIBGC_GLOBALS_H)
 PRIVATE_HEADERS= \
Index: compiler/compile_target_code.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/compile_target_code.m,v
retrieving revision 1.89
diff -u -r1.89 compile_target_code.m
--- compiler/compile_target_code.m	31 Jul 2006 08:31:31 -0000	1.89
+++ compiler/compile_target_code.m	14 Aug 2006 04:41:42 -0000
@@ -681,7 +681,9 @@
     globals.io_lookup_bool_option(inline_alloc, InlineAlloc, !IO),
     (
         InlineAlloc = yes,
-        InlineAllocOpt = "-DMR_INLINE_ALLOC -DSILENT "
+        % XXX disabled because inline allocation is broken in gc7.0 alpha6.
+        % InlineAllocOpt = "-DMR_INLINE_ALLOC "
+        InlineAllocOpt = ""
     ;
         InlineAlloc = no,
         InlineAllocOpt = ""
Index: extras/concurrency/semaphore.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/concurrency/semaphore.m,v
retrieving revision 1.15
diff -u -r1.15 semaphore.m
--- extras/concurrency/semaphore.m	20 Apr 2006 07:32:06 -0000	1.15
+++ extras/concurrency/semaphore.m	12 Aug 2006 01:15:06 -0000
@@ -91,7 +91,7 @@
 
 :- pragma foreign_decl("C", "
 #ifdef MR_CONSERVATIVE_GC
-  void ME_finalize_semaphore(GC_PTR obj, GC_PTR cd);
+  void ME_finalize_semaphore(void *obj, void *cd);
 #endif
 ").
 
@@ -142,7 +142,7 @@
 :- pragma foreign_code("C", "
 #ifdef MR_CONSERVATIVE_GC
   void
-  ME_finalize_semaphore(GC_PTR obj, GC_PTR cd)
+  ME_finalize_semaphore(void *obj, void *cd)
   {
     ME_Semaphore    *sem;
 
Index: library/par_builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/par_builtin.m,v
retrieving revision 1.4
diff -u -r1.4 par_builtin.m
--- library/par_builtin.m	9 Aug 2006 03:17:15 -0000	1.4
+++ library/par_builtin.m	12 Aug 2006 01:15:06 -0000
@@ -123,14 +123,14 @@
 
 :- pragma foreign_decl("C", "
 #ifdef MR_CONSERVATIVE_GC
-    void MR_finalize_future(GC_PTR obj, GC_PTR cd);
+    void MR_finalize_future(void *obj, void *cd);
 #endif
 ").
 
 :- pragma foreign_code("C", "
 #ifdef MR_CONSERVATIVE_GC
     void
-    MR_finalize_future(GC_PTR obj, GC_PTR cd)
+    MR_finalize_future(void *obj, void *cd)
     {
         MR_Future *fut = (MR_Future *) obj;
 
Index: robdd/bryant.c
===================================================================
RCS file: /home/mercury1/repository/mercury/robdd/bryant.c,v
retrieving revision 1.2
diff -u -r1.2 bryant.c
--- robdd/bryant.c	15 Dec 2004 06:57:45 -0000	1.2
+++ robdd/bryant.c	12 Aug 2006 01:15:06 -0000
@@ -1126,8 +1126,8 @@
 
 static int MR_ROBDD_removed_nodes = 0;
 
-void MR_ROBDD_remove_node(GC_PTR obj, GC_PTR client_data);
-void MR_ROBDD_remove_node(GC_PTR obj, GC_PTR client_data)
+void MR_ROBDD_remove_node(void *obj, void *client_data);
+void MR_ROBDD_remove_node(void *obj, void *client_data)
 {
     MR_ROBDD_node *n = (MR_ROBDD_node *) obj;
     MR_ROBDD_BRYANT_hidden_node_pointer *bucket =
Index: runtime/RESERVED_MACRO_NAMES
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/RESERVED_MACRO_NAMES,v
retrieving revision 1.17
diff -u -r1.17 RESERVED_MACRO_NAMES
--- runtime/RESERVED_MACRO_NAMES	28 Jun 2006 04:46:20 -0000	1.17
+++ runtime/RESERVED_MACRO_NAMES	14 Aug 2006 04:40:46 -0000
@@ -31,7 +31,6 @@
 __GC
 _GC_H
 HIDE_POINTER
-LINUX_THREADS
 REVEAL_POINTER
 #-----------------------------------------------------------------------------#
 # This is defined by mps_gc/code/mercury_mps.h,
@@ -51,11 +50,6 @@
 __KERNEL__
 sigcontext_struct
 #-----------------------------------------------------------------------------#
-# This is defined by the mgnuc script in some grades.
-# It is used for configuring the Boehm collector.
-# XXX it should have a GC_ prefix.
-NO_SIGNALS
-#-----------------------------------------------------------------------------#
 # These are defined automatically by GCC -- gcc optionally passes
 # them on the command line when calling cc1, depending on the
 # exact options which gcc was invoked with.  These are not
Index: runtime/mercury.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury.h,v
retrieving revision 1.73
diff -u -r1.73 mercury.h
--- runtime/mercury.h	29 Mar 2006 08:07:53 -0000	1.73
+++ runtime/mercury.h	13 Aug 2006 04:08:27 -0000
@@ -47,7 +47,7 @@
     #include "gc.h"
     #define GC_I_HIDE_POINTERS
     #ifdef MR_INLINE_ALLOC
-      #include "gc_inl.h"
+      #include "gc_inline.h"
     #endif
   #endif
 #else
Index: runtime/mercury_heap.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_heap.h,v
retrieving revision 1.34
diff -u -r1.34 mercury_heap.h
--- runtime/mercury_heap.h	15 Feb 2005 05:22:32 -0000	1.34
+++ runtime/mercury_heap.h	13 Aug 2006 04:07:31 -0000
@@ -77,8 +77,8 @@
   #ifdef MR_INLINE_ALLOC
 
     /*
-    ** The following stuff uses the macros in the `gc_inl.h' header file in the
-    ** Boehm garbage collector.  They improve performance a little for
+    ** The following stuff uses the macros in the `gc_inline.h' header file in
+    ** the Boehm garbage collector.  They improve performance a little for
     ** highly allocation-intensive programs (e.g. the `nrev' benchmark).
     ** You'll probably need to fool around with the `-I' options to get this
     ** to work.  Also, you must make sure that you compile with the same
@@ -104,7 +104,7 @@
       #error "MR_INLINE_ALLOC requires the use of GCC"
     #endif
 
-    #include "gc_inl.h"
+    #include "gc_inline.h"
     #define MR_tag_offset_incr_hp(dest, tag, offset, count)		\
 	( __builtin_constant_p(count) && (count) < 16			\
 	? ({	void * temp;						\
Index: runtime/mercury_prof_mem.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_prof_mem.c,v
retrieving revision 1.10
diff -u -r1.10 mercury_prof_mem.c
--- runtime/mercury_prof_mem.c	21 Feb 2002 23:51:42 -0000	1.10
+++ runtime/mercury_prof_mem.c	12 Aug 2006 01:15:06 -0000
@@ -13,8 +13,7 @@
 ** it may be in a malloc.  The handling routine may also do a malloc which 
 ** stuffs up the internal state of malloc and cause a seg fault.
 ** If we're using the conservative GC, that doesn't cause a problem,
-** since the Boehm et al collector is signal safe if compiled without
-** -DNO_SIGNALS, which we do for profiling grades.  But if we're not
+** since the Boehm et al collector is signal safe.  But if we're not
 ** using the conservative GC, then the handler will need to call malloc().
 ** To minimize this problem, we use our own version of malloc() which
 ** allocates memory in large chunks, reducing the chance of this
Index: runtime/mercury_prof_mem.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_prof_mem.h,v
retrieving revision 1.8
diff -u -r1.8 mercury_prof_mem.h
--- runtime/mercury_prof_mem.h	21 Feb 2002 23:51:42 -0000	1.8
+++ runtime/mercury_prof_mem.h	12 Aug 2006 01:15:06 -0000
@@ -23,9 +23,7 @@
 ** from a profiling interrupt that interrupted another call to MR_GC_malloc().
 ** Doing that is bad news, because MR_GC_malloc() is not guaranteed to be
 ** re-entrant.
-** (If conservative GC is enabled, then MR_GC_malloc() _is_ re-entrant,
-** since for profiling grades we compile the conservative collector without
-** -DNO_SIGNALS [see boehm_gc/README for documentation about -DNO_SIGNALS].
+** (If conservative GC is enabled, then MR_GC_malloc() _is_ re-entrant.)
 ** But if conservative GC is not enabled, then MR_GC_malloc() just
 ** calls malloc(), which is not guaranteed to be re-entrant.)
 **
Index: runtime/mercury_wrapper.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_wrapper.c,v
retrieving revision 1.163
diff -u -r1.163 mercury_wrapper.c
--- runtime/mercury_wrapper.c	7 Aug 2006 06:21:31 -0000	1.163
+++ runtime/mercury_wrapper.c	12 Aug 2006 01:15:06 -0000
@@ -669,7 +669,7 @@
 #ifdef MR_CONSERVATIVE_GC
 
   #ifdef MR_MPS_GC
-    MR_bool GC_quiet = MR_TRUE;
+    MR_bool MR_mps_quiet = MR_TRUE;
   #endif
 
   #ifdef MR_HIGHTAGS
@@ -682,7 +682,7 @@
 {
   #ifdef MR_MPS_GC
 
-    mercury_mps_init(MR_heap_size * 1024, !GC_quiet);
+    mercury_mps_init(MR_heap_size * 1024, !MR_mps_quiet);
 
   #else /* MR_BOEHM_GC */
 
@@ -696,8 +696,6 @@
     */
     MR_runqueue_head = NULL;
 
-    GC_quiet = MR_TRUE;
-
     /*
     ** Call GC_INIT() to tell the garbage collector about this DLL.
     ** (This is necessary to support Windows DLLs using gnu-win32.)
@@ -1521,8 +1519,8 @@
                     MR_sregdebug      = MR_TRUE;
                     MR_finaldebug     = MR_TRUE;
                     MR_tracedebug     = MR_TRUE;
-#ifdef MR_CONSERVATIVE_GC
-                    GC_quiet = MR_FALSE;
+#ifdef MR_MPS_GC
+                    MR_mps_quiet = MR_FALSE;
 #endif
 #ifdef MR_NATIVE_GC
                     MR_agc_debug      = MR_TRUE;
@@ -1544,8 +1542,8 @@
                 } else if (MR_streq(MR_optarg, "g")) {
                     MR_gotodebug    = MR_TRUE;
                 } else if (MR_streq(MR_optarg, "G")) {
-#ifdef MR_CONSERVATIVE_GC
-                    GC_quiet = MR_FALSE;
+#ifdef MR_MPS_GC
+                    MR_mps_quiet = MR_FALSE;
 #elif defined(MR_NATIVE_GC)
                     MR_agc_debug = MR_TRUE;
 #else
Index: scripts/mgnuc.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/mgnuc.in,v
retrieving revision 1.115
diff -u -r1.115 mgnuc.in
--- scripts/mgnuc.in	2 Aug 2006 06:48:56 -0000	1.115
+++ scripts/mgnuc.in	12 Aug 2006 01:15:06 -0000
@@ -310,9 +310,7 @@
 
 case $profile_time in
     true)       PROF_TIME_OPTS="-DMR_MPROF_PROFILE_TIME" ;;
-    false)      PROF_TIME_OPTS="-DNO_SIGNALS" ;;
-                # We pass -DNO_SIGNALS unless profiling is enabled.
-                # See comments in runtime/mercury_prof_mem.h for why.
+    false)      PROF_TIME_OPTS="" ;;
 esac
 
 case $profile_calls in
Index: tools/bootcheck
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/bootcheck,v
retrieving revision 1.183
diff -u -r1.183 bootcheck
--- tools/bootcheck	25 Jul 2006 09:42:14 -0000	1.183
+++ tools/bootcheck	14 Aug 2006 06:14:57 -0000
@@ -716,6 +716,8 @@
             cp $root/boehm_gc/NT_MAKEFILE .
             cp $root/boehm_gc/gc_cpp.cc .
             $LN_S $root/boehm_gc/machdeps .
+            cp $root/boehm_gc/configure_atomic_ops.sh .
+            cp -r $root/boehm_gc/libatomic_ops-*[0-9] .
             cd $root/$stage2dir
         else
             $LN_S $root/boehm_gc .
Index: .README.in
===================================================================
RCS file: /home/mercury1/repository/mercury/.README.in,v
retrieving revision 1.16
diff -u -r1.16 .README.in
--- .README.in	14 Mar 2006 06:00:02 -0000	1.16
+++ .README.in	14 Aug 2006 11:32:58 -0000
@@ -16,13 +16,13 @@
 	if the need should arise.
 	
 The subdirectory `boehm_gc' contains a slightly modified copy of
-version 6.5 of the conservative garbage collector distributed
-by Hans Boehm:
+version 7.0 alpha 6 (CVS 2006-08-14) of the conservative garbage collector
+distributed by Hans Boehm:
 
 	Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
 	Copyright (c) 1991-1995 by Xerox Corporation.  All rights reserved.
 	Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
-	Copyright (c) 1999-2001 by Hewlett-Packard. All rights reserved.
+	Copyright (c) 1999-2005 Hewlett-Packard Development Company, L.P.
 
 	THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
 	EXPRESSED OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list