dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dotgnu-pnet-commits] pnet ChangeLog libgc/configure libgc/configure....


From: Klaus Treichel
Subject: [dotgnu-pnet-commits] pnet ChangeLog libgc/configure libgc/configure....
Date: Sun, 05 Nov 2006 18:49:53 +0000

CVSROOT:        /cvsroot/dotgnu-pnet
Module name:    pnet
Changes by:     Klaus Treichel <ktreichel>      06/11/05 18:49:53

Modified files:
        .              : ChangeLog 
        libgc          : configure configure.in darwin_stop_world.c 
                         dyn_load.c malloc.c os_dep.c pthread_support.c 
                         version.h 
        libgc/doc      : README README.changes 
        libgc/include  : gc_config_macros.h gc.h 
        libgc/include/private: gcconfig.h 

Log message:
        2006-11-05  Klaus Treichel  <address@hidden>
        
                * libgc/configure, libgc/configure.in, 
libgc/darwin_stop_world.c,
                libgc/dyn_load.c, libgc/malloc.c, libgc/os_dep.c, 
libgc/pthread_support.c,
                libgc/version.h, libgc/doc/README, libgc/doc/README.changes,
                libgc/include/gc_config_macros.h, libgc/include/gc.h,
                libgc/include/private/gcconfig.h: Update to libgc 6.8.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnet/ChangeLog?cvsroot=dotgnu-pnet&r1=1.3386&r2=1.3387
http://cvs.savannah.gnu.org/viewcvs/pnet/libgc/configure?cvsroot=dotgnu-pnet&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/pnet/libgc/configure.in?cvsroot=dotgnu-pnet&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/pnet/libgc/darwin_stop_world.c?cvsroot=dotgnu-pnet&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/pnet/libgc/dyn_load.c?cvsroot=dotgnu-pnet&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/pnet/libgc/malloc.c?cvsroot=dotgnu-pnet&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/pnet/libgc/os_dep.c?cvsroot=dotgnu-pnet&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/pnet/libgc/pthread_support.c?cvsroot=dotgnu-pnet&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/pnet/libgc/version.h?cvsroot=dotgnu-pnet&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/pnet/libgc/doc/README?cvsroot=dotgnu-pnet&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/pnet/libgc/doc/README.changes?cvsroot=dotgnu-pnet&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/pnet/libgc/include/gc_config_macros.h?cvsroot=dotgnu-pnet&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/pnet/libgc/include/gc.h?cvsroot=dotgnu-pnet&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/pnet/libgc/include/private/gcconfig.h?cvsroot=dotgnu-pnet&r1=1.11&r2=1.12

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.3386
retrieving revision 1.3387
diff -u -b -r1.3386 -r1.3387
--- ChangeLog   4 Nov 2006 10:53:18 -0000       1.3386
+++ ChangeLog   5 Nov 2006 18:49:52 -0000       1.3387
@@ -1,3 +1,11 @@
+2006-11-05  Klaus Treichel  <address@hidden>
+
+       * libgc/configure, libgc/configure.in, libgc/darwin_stop_world.c,
+       libgc/dyn_load.c, libgc/malloc.c, libgc/os_dep.c, 
libgc/pthread_support.c,
+       libgc/version.h, libgc/doc/README, libgc/doc/README.changes,
+       libgc/include/gc_config_macros.h, libgc/include/gc.h,
+       libgc/include/private/gcconfig.h: Update to libgc 6.8.
+
 2006-11-04  Kirill Kononenko  <address@hidden>
 
        * engine/process.c: Don't destroy the current thread before invoking the

Index: libgc/configure
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/configure,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- libgc/configure     19 Mar 2006 15:22:37 -0000      1.7
+++ libgc/configure     5 Nov 2006 18:49:52 -0000       1.8
@@ -1,7 +1,7 @@
 #! /bin/sh
 # From configure.in Revision: 1.2 .
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for gc 6.7.
+# Generated by GNU Autoconf 2.59 for gc 6.8.
 #
 # Report bugs to <address@hidden>.
 #
@@ -429,8 +429,8 @@
 # Identity of this package.
 PACKAGE_NAME='gc'
 PACKAGE_TARNAME='gc'
-PACKAGE_VERSION='6.7'
-PACKAGE_STRING='gc 6.7'
+PACKAGE_VERSION='6.8'
+PACKAGE_STRING='gc 6.8'
 PACKAGE_BUGREPORT='address@hidden'
 
 ac_unique_file="gcj_mlc.c"
@@ -956,7 +956,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures gc 6.7 to adapt to many kinds of systems.
+\`configure' configures gc 6.8 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1023,7 +1023,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of gc 6.7:";;
+     short | recursive ) echo "Configuration of gc 6.8:";;
    esac
   cat <<\_ACEOF
 
@@ -1167,7 +1167,7 @@
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
-gc configure 6.7
+gc configure 6.8
 generated by GNU Autoconf 2.59
 
 Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1181,7 +1181,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by gc $as_me 6.7, which was
+It was created by gc $as_me 6.8, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   $ $0 $@
@@ -1953,7 +1953,7 @@
 
 # Define the identity of the package.
  PACKAGE='gc'
- VERSION='6.7'
+ VERSION='6.8'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4008,9 +4008,9 @@
 _ACEOF
 
        ;;
-     *-*-hpux*)
-       { echo "$as_me:$LINENO: WARNING: \"Only HP/UX 11 threads are 
supported.\"" >&5
-echo "$as_me: WARNING: \"Only HP/UX 11 threads are supported.\"" >&2;}
+     *-*-hpux11*)
+       { echo "$as_me:$LINENO: WARNING: \"Only HP-UX 11 POSIX threads are 
supported.\"" >&5
+echo "$as_me: WARNING: \"Only HP-UX 11 POSIX threads are supported.\"" >&2;}
        cat >>confdefs.h <<\_ACEOF
 #define GC_HPUX_THREADS 1
 _ACEOF
@@ -4030,6 +4030,16 @@
 _ACEOF
 
        THREADDLLIBS="-lpthread -lrt"
+       # HPUX needs REENTRANT for the _r calls.
+
+cat >>confdefs.h <<\_ACEOF
+#define _REENTRANT 1
+_ACEOF
+
+       ;;
+     *-*-hpux10*)
+       { echo "$as_me:$LINENO: WARNING: \"Only HP-UX 11 POSIX threads are 
supported.\"" >&5
+echo "$as_me: WARNING: \"Only HP-UX 11 POSIX threads are supported.\"" >&2;}
        ;;
      *-*-freebsd*)
        { echo "$as_me:$LINENO: WARNING: \"FreeBSD does not yet fully support 
threads with Boehm GC.\"" >&5
@@ -6069,7 +6079,7 @@
 case $host in
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 6072 "configure"' > conftest.$ac_ext
+  echo '#line 6082 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -6642,7 +6652,7 @@
 save_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
 compiler_c_o=no
-if { (eval echo configure:6645: \"$ac_compile\") 1>&5; (eval $ac_compile) 
2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+if { (eval echo configure:6655: \"$ac_compile\") 1>&5; (eval $ac_compile) 
2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
   # The compiler can only warn and ignore the option if not recognized
   # So say no if there are warnings
   if test -s out/conftest.err; then
@@ -8569,7 +8579,7 @@
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 8572 "configure"
+#line 8582 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -8667,7 +8677,7 @@
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 8670 "configure"
+#line 8680 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10289,7 +10299,7 @@
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by gc $as_me 6.7, which was
+This file was extended by gc $as_me 6.8, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -10347,7 +10357,7 @@
 
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-gc config.status 6.7
+gc config.status 6.8
 configured by $0, generated by GNU Autoconf 2.59,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 

Index: libgc/configure.in
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/configure.in,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- libgc/configure.in  19 Mar 2006 15:22:37 -0000      1.9
+++ libgc/configure.in  5 Nov 2006 18:49:52 -0000       1.10
@@ -17,12 +17,12 @@
 # Initialization
 # ==============
 
-AC_INIT(gc,6.7,address@hidden) 
+AC_INIT(gc,6.8,address@hidden) 
     ## version must conform to [0-9]+[.][0-9]+(alpha[0-9]+)?
 AC_CONFIG_SRCDIR(gcj_mlc.c)
 AC_CANONICAL_TARGET 
 AC_PREREQ(2.53)
-AC_REVISION($Revision: 1.9 $)
+AC_REVISION($Revision: 1.10 $)
 GC_SET_VERSION
 AM_INIT_AUTOMAKE
 
@@ -94,8 +94,8 @@
        AC_DEFINE(GC_AIX_THREADS)
        AC_DEFINE(_REENTRANT)
        ;;
-     *-*-hpux*)
-       AC_MSG_WARN("Only HP/UX 11 threads are supported.")
+     *-*-hpux11*)
+       AC_MSG_WARN("Only HP-UX 11 POSIX threads are supported.")
        AC_DEFINE(GC_HPUX_THREADS)
        AC_DEFINE(_POSIX_C_SOURCE,199506L)
        if test "${enable_parallel_mark}" = yes; then
@@ -103,6 +103,11 @@
        fi
        AC_DEFINE(THREAD_LOCAL_ALLOC)
        THREADDLLIBS="-lpthread -lrt"
+       # HPUX needs REENTRANT for the _r calls.
+       AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads])
+       ;;
+     *-*-hpux10*)
+       AC_MSG_WARN("Only HP-UX 11 POSIX threads are supported.")
        ;;
      *-*-freebsd*)
        AC_MSG_WARN("FreeBSD does not yet fully support threads with Boehm GC.")
@@ -110,6 +115,17 @@
        INCLUDES="$INCLUDES -pthread"
        THREADDLLIBS=-pthread
        ;;
+     *-*-kfreebsd*-gnu)
+       AC_DEFINE(GC_FREEBSD_THREADS)
+       INCLUDES="$INCLUDES -pthread"
+       THREADDLLIBS=-pthread
+       AC_DEFINE(_REENTRANT)
+        if test "${enable_parallel_mark}" = yes; then
+         AC_DEFINE(PARALLEL_MARK)
+       fi
+       AC_DEFINE(THREAD_LOCAL_ALLOC)
+       AC_DEFINE(USE_COMPILER_TLS)
+       ;;
      *-*-netbsd*)
        AC_MSG_WARN("Only on NetBSD 2.0 or later.")
        AC_DEFINE(GC_NETBSD_THREADS)

Index: libgc/darwin_stop_world.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/darwin_stop_world.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- libgc/darwin_stop_world.c   19 Mar 2006 15:22:37 -0000      1.3
+++ libgc/darwin_stop_world.c   5 Nov 2006 18:49:52 -0000       1.4
@@ -169,6 +169,7 @@
 
 void GC_push_all_stacks() {
     int i;
+       task_t my_task;
     kern_return_t r;
     mach_port_t me;
     ptr_t lo, hi;
@@ -178,7 +179,8 @@
     me = mach_thread_self();
     if (!GC_thr_initialized) GC_thr_init();
     
-    r = task_threads(current_task(), &act_list, &listcount);
+       my_task = current_task();
+    r = task_threads(my_task, &act_list, &listcount);
     if(r != KERN_SUCCESS) ABORT("task_threads failed");
     for(i = 0; i < listcount; i++) {
       thread_act_t thread = act_list[i];
@@ -268,8 +270,10 @@
                 );
 #     endif
       GC_push_all_stack(lo, hi); 
+         mach_port_deallocate(my_task, thread);
     } /* for(p=GC_threads[i]...) */
-    vm_deallocate(current_task(), (vm_address_t)act_list, sizeof(thread_t) * 
listcount);
+    vm_deallocate(my_task, (vm_address_t)act_list, sizeof(thread_t) * 
listcount);
+       mach_port_deallocate(my_task, me);
 }
 #endif /* !DARWIN_DONT_PARSE_STACK */
 
@@ -363,6 +367,7 @@
     } 
     if (!found) GC_mach_threads_count++;
   }
+  mach_port_deallocate(current_task(), my_thread);
   return changed;
 }
 
@@ -372,6 +377,7 @@
 {
   int i, changes;
     GC_thread p;
+       task_t my_task = current_task();
     mach_port_t my_thread = mach_thread_self();
     kern_return_t kern_result;
     thread_act_array_t act_list, prev_list;
@@ -407,13 +413,21 @@
       prevcount = 0;
       do {
        int result;
-       kern_result = task_threads(current_task(), &act_list, &listcount);
+       kern_result = task_threads(my_task, &act_list, &listcount);
        result = GC_suspend_thread_list(act_list, listcount,
                                        prev_list, prevcount);
        changes = result;
        prev_list = act_list;
        prevcount = listcount;
-        vm_deallocate(current_task(), (vm_address_t)act_list, sizeof(thread_t) 
* listcount);
+       
+       if(kern_result == KERN_SUCCESS) {
+               int i;
+               
+               for(i = 0; i < listcount; i++)
+                       mach_port_deallocate(my_task, act_list[i]);
+               
+        vm_deallocate(my_task, (vm_address_t)act_list, sizeof(thread_t) * 
listcount);
+       }
       } while (changes);
       
  
@@ -430,12 +444,15 @@
     #if DEBUG_THREADS
       GC_printf1("World stopped from 0x%lx\n", my_thread);
     #endif
+         
+         mach_port_deallocate(my_task, my_thread);
 }
 
 /* Caller holds allocation lock, and has held it continuously since    */
 /* the world stopped.                                                  */
 void GC_start_world()
 {
+  task_t my_task = current_task();
   mach_port_t my_thread = mach_thread_self();
   int i, j;
   GC_thread p;
@@ -456,7 +473,7 @@
       }
 #   endif
 
-    kern_result = task_threads(current_task(), &act_list, &listcount);
+    kern_result = task_threads(my_task, &act_list, &listcount);
     for(i = 0; i < listcount; i++) {
       thread_act_t thread = act_list[i];
       if (thread != my_thread &&
@@ -484,8 +501,12 @@
          } 
        }
       }
+         
+         mach_port_deallocate(my_task, thread);
     }
-    vm_deallocate(current_task(), (vm_address_t)act_list, sizeof(thread_t) * 
listcount);
+    vm_deallocate(my_task, (vm_address_t)act_list, sizeof(thread_t) * 
listcount);
+       
+       mach_port_deallocate(my_task, my_thread);
 #   if DEBUG_THREADS
      GC_printf0("World started\n");
 #   endif

Index: libgc/dyn_load.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/dyn_load.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- libgc/dyn_load.c    19 Mar 2006 15:22:37 -0000      1.8
+++ libgc/dyn_load.c    5 Nov 2006 18:49:52 -0000       1.9
@@ -26,7 +26,7 @@
  * None of this is safe with dlclose and incremental collection.
  * But then not much of anything is safe in the presence of dlclose.
  */
-#if defined(__linux__) && !defined(_GNU_SOURCE)
+#if (defined(__linux__) || defined(__GLIBC__)) && !defined(_GNU_SOURCE)
     /* Can't test LINUX, since this must be define before other includes */
 #   define _GNU_SOURCE
 #endif
@@ -381,7 +381,7 @@
 /* For glibc 2.2.4+.  Unfortunately, it doesn't work for older */
 /* versions.  Thanks to Jakub Jelinek for most of the code.    */
 
-# if defined(LINUX) /* Are others OK here, too? */ \
+# if (defined(LINUX) || defined (__GLIBC__)) /* Are others OK here, too? */ \
      && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
          || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) 
 

Index: libgc/malloc.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/malloc.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- libgc/malloc.c      19 Mar 2006 15:22:37 -0000      1.5
+++ libgc/malloc.c      5 Nov 2006 18:49:52 -0000       1.6
@@ -355,6 +355,12 @@
     size_t lb;
 # endif
   {
+#   if defined(GC_WIN32_THREADS) && defined(__GNUC__)
+      /* According to Gerard Allen, this helps with MINGW.     */
+      /* When using threads need to initalised before use, but GCC uses a 
malloc 
+         in  __w32_sharedptr_initialize (w32-shared-ptr.c) */
+      if (!GC_is_initialized) GC_init();
+#   endif
     /* It might help to manually inline the GC_malloc call here.       */
     /* But any decent compiler should reduce the extra procedure call  */
     /* to at most a jump instruction in this case.                     */

Index: libgc/os_dep.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/os_dep.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- libgc/os_dep.c      19 Mar 2006 15:22:37 -0000      1.10
+++ libgc/os_dep.c      5 Nov 2006 18:49:52 -0000       1.11
@@ -1626,13 +1626,20 @@
     ptr_t cur_brk = (ptr_t)sbrk(0);
     SBRK_ARG_T lsbs = (word)cur_brk & (GC_page_size-1);
     
-    if ((SBRK_ARG_T)bytes < 0) return(0); /* too big */
+    if ((SBRK_ARG_T)bytes < 0) {
+       result = 0; /* too big */
+       goto out;
+    }
     if (lsbs != 0) {
-        if((ptr_t)sbrk(GC_page_size - lsbs) == (ptr_t)(-1)) return(0);
+        if((ptr_t)sbrk(GC_page_size - lsbs) == (ptr_t)(-1)) {
+           result = 0;
+           goto out;
+       }
     }
     result = (ptr_t)sbrk((SBRK_ARG_T)bytes);
     if (result == (ptr_t)(-1)) result = 0;
   }
+ out:
 # ifdef IRIX5
     __UNLOCK_MALLOC();
 # endif

Index: libgc/pthread_support.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/pthread_support.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- libgc/pthread_support.c     19 Mar 2006 15:22:37 -0000      1.6
+++ libgc/pthread_support.c     5 Nov 2006 18:49:52 -0000       1.7
@@ -598,6 +598,11 @@
     } else {
         prev -> next = p -> next;
     }
+       
+#ifdef GC_DARWIN_THREADS
+       mach_port_deallocate(mach_task_self(), p->stop_info.mach_thread);
+#endif
+       
     GC_INTERNAL_FREE(p);
 }
 
@@ -620,6 +625,11 @@
     } else {
         prev -> next = p -> next;
     }
+       
+#ifdef GC_DARWIN_THREADS
+       mach_port_deallocate(mach_task_self(), p->stop_info.mach_thread);
+#endif
+       
     GC_INTERNAL_FREE(p);
 }
 

Index: libgc/version.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/version.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- libgc/version.h     19 Mar 2006 15:22:37 -0000      1.7
+++ libgc/version.h     5 Nov 2006 18:49:52 -0000       1.8
@@ -2,7 +2,7 @@
 /* Eventually this one may become unnecessary.  For now we need        */
 /* it to keep the old-style build process working.             */
 #define GC_TMP_VERSION_MAJOR 6
-#define GC_TMP_VERSION_MINOR 7
+#define GC_TMP_VERSION_MINOR 8
 #define GC_TMP_ALPHA_VERSION GC_NOT_ALPHA
 
 #ifndef GC_NOT_ALPHA

Index: libgc/doc/README
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/doc/README,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- libgc/doc/README    19 Mar 2006 15:22:37 -0000      1.7
+++ libgc/doc/README    5 Nov 2006 18:49:52 -0000       1.8
@@ -28,7 +28,7 @@
 collector.  (If you are concerned about such things, I recommend you look
 at the notice in config.guess or ltmain.sh.)
 
-This is version 6.7 of a conservative garbage collector for C and C++.
+This is version 6.8 of a conservative garbage collector for C and C++.
 
 You might find a more recent version of this at
 

Index: libgc/doc/README.changes
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/doc/README.changes,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- libgc/doc/README.changes    19 Mar 2006 15:22:37 -0000      1.7
+++ libgc/doc/README.changes    5 Nov 2006 18:49:52 -0000       1.8
@@ -2284,6 +2284,22 @@
  - Fix Makefile.am, so it handles exe extensions under Cygwin correctly
    for gctest.
 
+Since 6.7:
+ - Added some support for Dragonfly BSD.  (Thanks to Joerg Sonnenberger and
+   Thomas Klausner.)
+ - Improvements to the HP/UX section of configure.in.
+   (Thanks to Andreas Tobler.)
+ - GC_unix_get_mem could neglect to release the malloc lock on Irix, under
+   extremely unlikely circumstances.  Thanks to Jean-Baptiste Nivois for
+   some careful code reading.
+ - Added support for kFreeBSD + glibc (Thanks to Petr Salinger)
+ - Fix more MacOS threads memory leaks (Thanks to Allan Hsu)
+ - Added initial Solaris/X86-64 support (Thanks to Rainer Orth)
+ - Applied a long-lost MINGW patch from Gerard Allan for malloc redirection
+   with threads.  This one probably makes no sense for 7.0, and was not applied
+   there.
+ - The Solaris/SPARC definition of GC_INIT() in gc.h wasn't C++-compilable.
+
 To do:
  - The USE_MUNMAP code should really use a separate data structure
    indexed by physical page to keep track of time since last use of

Index: libgc/include/gc_config_macros.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/include/gc_config_macros.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- libgc/include/gc_config_macros.h    19 Mar 2006 15:22:37 -0000      1.3
+++ libgc/include/gc_config_macros.h    5 Nov 2006 18:49:52 -0000       1.4
@@ -92,7 +92,7 @@
 #   define GC_DARWIN_THREADS
 #   define GC_PTHREADS
 # endif
-# if !defined(GC_PTHREADS) && defined(__FreeBSD__)
+# if !defined(GC_PTHREADS) && (defined(__FreeBSD__) || defined(__DragonFly__))
 #   define GC_FREEBSD_THREADS
 #   define GC_PTHREADS
 # endif

Index: libgc/include/gc.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/include/gc.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- libgc/include/gc.h  19 Mar 2006 15:22:37 -0000      1.13
+++ libgc/include/gc.h  5 Nov 2006 18:49:52 -0000       1.14
@@ -469,7 +469,7 @@
 #   define GC_RETURN_ADDR (GC_word)__return_address
 #endif
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__GLIBC__)
 # include <features.h>
 # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
      && !defined(__ia64__)
@@ -498,7 +498,7 @@
 /* This may also be desirable if it is possible but expensive to       */
 /* retrieve the call chain.                                            */
 #if (defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__) \
-     || defined(__FreeBSD__)) & !defined(GC_CAN_SAVE_CALL_STACKS)
+     || defined(__FreeBSD__) || defined(__DragonFly__)) & 
!defined(GC_CAN_SAVE_CALL_STACKS)
 # define GC_ADD_CALLER
 # if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) 
     /* gcc knows how to retrieve return address, but we don't know */
@@ -750,7 +750,7 @@
        /* be finalized.  Return the number of finalizers       */
        /* that were run.  Normally this is also called         */
        /* implicitly during some allocations.  If              */
-       /* GC-finalize_on_demand is nonzero, it must be called  */
+       /* GC_finalize_on_demand is nonzero, it must be called  */
        /* explicitly.                                          */
 
 /* GC_set_warn_proc can be used to redirect or filter warning messages.        
*/
@@ -965,16 +965,14 @@
      * from the statically loaded program section.
      * This circumvents a Solaris 2.X (X<=4) linker bug.
      */
+    extern int _end[], _etext[];
 #   ifdef __cplusplus
-#     define GC_INIT() { extern int _end[], _etext[]; \
-                        extern "C" void GC_noop1(GC_word); \
-                        GC_noop1((GC_word)_end); \
-                        GC_noop1((GC_word)_etext); }
+      extern "C" void GC_noop1(GC_word);
 #   else
-#     define GC_INIT() { extern int _end[], _etext[]; \
-                        extern void GC_noop(); \
-                        GC_noop(_end, _etext); }
+      void GC_noop1();
 #   endif /* !__cplusplus */
+#   define GC_INIT() { GC_noop1((GC_word)_end); \
+                      GC_noop1((GC_word)_etext); }
 #else
 # if defined(__CYGWIN32__) || defined (_AIX)
     /*

Index: libgc/include/private/gcconfig.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/include/private/gcconfig.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- libgc/include/private/gcconfig.h    19 Mar 2006 15:22:37 -0000      1.11
+++ libgc/include/private/gcconfig.h    5 Nov 2006 18:49:53 -0000       1.12
@@ -55,7 +55,8 @@
 # endif
 
 /* And one for FreeBSD: */
-# if defined(__FreeBSD__) && !defined(FREEBSD)
+# if (defined(__FreeBSD__) || defined(__DragonFly__) || \
+       defined(__FreeBSD_kernel__)) && !defined(FREEBSD)
 #    define FREEBSD
 # endif
 
@@ -153,6 +154,11 @@
 #    define SUNOS5
 #    define mach_type_known
 # endif
+# if defined(sun) && defined(__amd64)
+#    define X86_64
+#    define SOLARIS
+#    define mach_type_known
+# endif
 # if (defined(__OS2__) || defined(__EMX__)) && defined(__32BIT__)
 #    define I386
 #    define OS2
@@ -174,7 +180,8 @@
 #   define mach_type_known
 # endif
 # if defined(sparc) && defined(unix) && !defined(sun) && !defined(linux) \
-     && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__FreeBSD__)
+     && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__FreeBSD__) 
\
+     && !defined(__DragonFly__)
 #   define SPARC
 #   define DRSNX
 #   define mach_type_known
@@ -1249,8 +1256,15 @@
 #      ifndef GC_FREEBSD_THREADS
 #          define MPROTECT_VDB
 #      endif
+#      ifdef __GLIBC__
+#          define SIG_SUSPEND          (32+6)
+#          define SIG_THR_RESTART      (32+5)
+           extern int _end[];
+#          define DATAEND (_end)
+#      else
 #      define SIG_SUSPEND SIGUSR1
 #      define SIG_THR_RESTART SIGUSR2
+#      endif
 #      define FREEBSD_STACKBOTTOM
 #      ifdef __ELF__
 #          define DYNAMIC_LOADING
@@ -1993,6 +2007,28 @@
 #          define PREFETCH_FOR_WRITE(x) __builtin_prefetch((x), 1)
 #      endif
 #   endif
+#   ifdef FREEBSD
+#      define OS_TYPE "FREEBSD"
+#      ifndef GC_FREEBSD_THREADS
+#          define MPROTECT_VDB
+#      endif
+#      ifdef __GLIBC__
+#          define SIG_SUSPEND          (32+6)
+#          define SIG_THR_RESTART      (32+5)
+           extern int _end[];
+#          define DATAEND (_end)
+#      else
+#          define SIG_SUSPEND SIGUSR1
+#          define SIG_THR_RESTART SIGUSR2
+#      endif
+#      define FREEBSD_STACKBOTTOM
+#      ifdef __ELF__
+#          define DYNAMIC_LOADING
+#      endif
+       extern char etext[];
+       extern char * GC_FreeBSDGetDataStart();
+#      define DATASTART GC_FreeBSDGetDataStart(0x1000, &etext)
+#   endif
 #   ifdef NETBSD
 #      define OS_TYPE "NETBSD"
 #      ifdef __ELF__
@@ -2002,6 +2038,47 @@
        extern char etext[];
 #      define SEARCH_FOR_DATA_START
 #   endif
+#   ifdef SOLARIS
+#      define OS_TYPE "SOLARIS"
+#      define ELF_CLASS ELFCLASS64
+        extern int _etext[], _end[];
+       extern ptr_t GC_SysVGetDataStart(size_t, ptr_t);
+#       define DATASTART GC_SysVGetDataStart(0x1000, (ptr_t)_etext)
+#      define DATAEND (_end)
+/*     # define STACKBOTTOM ((ptr_t)(_start)) worked through 2.7,      */
+/*      but reportedly breaks under 2.8.  It appears that the stack    */
+/*     base is a property of the executable, so this should not break  */
+/*     old executables.                                                */
+/*     HEURISTIC2 probably works, but this appears to be preferable.   */
+/*     Apparently USRSTACK is defined to be USERLIMIT, but in some     */
+/*     installations that's undefined.  We work around this with a     */
+/*     gross hack:                                                     */
+#       include <sys/vmparam.h>
+#      ifdef USERLIMIT
+         /* This should work everywhere, but doesn't.  */
+#        define STACKBOTTOM USRSTACK
+#       else
+#        define HEURISTIC2
+#       endif
+/* At least in Solaris 2.5, PROC_VDB gives wrong values for dirty bits. */
+/* It appears to be fixed in 2.8 and 2.9.                              */
+#      ifdef SOLARIS25_PROC_VDB_BUG_FIXED
+#        define PROC_VDB
+#      endif
+#      define DYNAMIC_LOADING
+#      if !defined(USE_MMAP) && defined(REDIRECT_MALLOC)
+#          define USE_MMAP
+           /* Otherwise we now use calloc.  Mmap may result in the     */
+           /* heap interleaved with thread stacks, which can result in */
+           /* excessive blacklisting.  Sbrk is unusable since it       */
+           /* doesn't interact correctly with the system malloc.       */
+#      endif
+#       ifdef USE_MMAP
+#         define HEAP_START (ptr_t)0x40000000
+#       else
+#        define HEAP_START DATAEND
+#       endif
+#   endif
 # endif
 
 #if defined(LINUX) && defined(USE_MMAP)
@@ -2064,7 +2141,8 @@
 #   define SUNOS5SIGS
 # endif
 
-# if defined(FREEBSD) && (__FreeBSD__ >= 4)
+# if defined(FREEBSD) && \
+     (defined(__DragonFly__) || __FreeBSD__ >= 4 || (__FreeBSD_kernel__ >= 4))
 #   define SUNOS5SIGS
 # endif
 
@@ -2132,7 +2210,7 @@
 #   define CACHE_LINE_SIZE 32  /* Wild guess   */
 # endif
 
-# ifdef LINUX
+# if defined(LINUX) || defined(__GLIBC__)
 #   define REGISTER_LIBRARIES_EARLY
     /* We sometimes use dl_iterate_phdr, which may acquire an internal */
     /* lock.  This isn't safe after the world has stopped.  So we must */
@@ -2216,7 +2294,7 @@
 #if defined(SPARC)
 # define CAN_SAVE_CALL_ARGS
 #endif
-#if (defined(I386) || defined(X86_64)) && defined(LINUX)
+#if (defined(I386) || defined(X86_64)) && (defined(LINUX) || 
defined(__GLIBC__))
            /* SAVE_CALL_CHAIN is supported if the code is compiled to save     
*/
            /* frame pointers by default, i.e. no -fomit-frame-pointer flag.    
*/
 # define CAN_SAVE_CALL_ARGS




reply via email to

[Prev in Thread] Current Thread [Next in Thread]