]> granicus.if.org Git - gc/commitdiff
2007-02-01 Geoff Norton <gnorton@customerdna.com>
authorGeoff Norton <grompf@sublimeintervention.com>
Thu, 1 Feb 2007 16:08:59 +0000 (16:08 +0000)
committerguest <ivmai@mail.ru>
Fri, 29 Jul 2011 11:31:20 +0000 (15:31 +0400)
        * include/private/gc_pthread_redirects.h:
* include/private/gc_config_macros.h:
* include/private/gc_priv.h:
* configure.in:
* pthread_support.c
* specific.c:  Support for NetBSD-CURRENT.  Loosely based on NetBSD
pkgsrc patch.

svn path=/trunk/mono/; revision=72097

ChangeLog
configure.in
include/gc_config_macros.h
include/gc_pthread_redirects.h
include/private/gc_priv.h
pthread_support.c
specific.c

index 0b800d82200cf71738ea30aed4a790b90ad51941..dc5e6fd2906b04946c5d3d090421a96160c13861 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-02-01  Geoff Norton  <gnorton@customerdna.com>
+
+       * include/private/gc_pthread_redirects.h:
+       * include/private/gc_config_macros.h:
+       * include/private/gc_priv.h:
+       * configure.in:
+       * pthread_support.c
+       * specific.c:  Support for NetBSD-CURRENT.  Loosely based on NetBSD
+       pkgsrc patch.
+
 2006-12-22  Robert Jordan  <robertj@gmx.net>
 
        * include/private/gcconfig.h, os_dep.c:
index 96acc156697b8f1b26bf1130ebdee547c8f7bdef..6fcf1ace4dcfcee1a310036651c7be44ce2b2350 100644 (file)
@@ -151,6 +151,13 @@ case "$THREADS" in
          AC_DEFINE(PARALLEL_MARK)
        fi
        ;;
+     *-*-netbsd*)
+       AC_DEFINE(GC_NETBSD_THREADS)
+       if test "${enable_parallel_mark}" = yes; then
+         AC_DEFINE(PARALLEL_MARK)
+       fi
+       AC_DEFINE(THREAD_LOCAL_ALLOC)
+       ;;
      *-*-osf*)
        AC_DEFINE(GC_OSF1_THREADS)
         if test "${enable_parallel_mark}" = yes; then
index 4671864b89bc56a31e1cd6aeb5bb445c6d98995b..d8f38303c0a62de9acd79fd9328208e59527f74b 100644 (file)
@@ -56,7 +56,7 @@
        defined(GC_IRIX_THREADS) || defined(GC_LINUX_THREADS) || \
        defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) || \
        defined(GC_DGUX386_THREADS) || defined(GC_DARWIN_THREADS) || \
-       defined(GC_AIX_THREADS) || \
+       defined(GC_AIX_THREADS) || defined(GC_NETBSD_THREADS) || \
         (defined(GC_WIN32_THREADS) && defined(__CYGWIN32__))
 #   define GC_PTHREADS
 # endif
index f42b0f6a3e133cc0c0294af9bfd7d3ac8fb56547..bedcc26ac7ed202343f47092ad857676be00b6d7 100644 (file)
 # define pthread_join GC_pthread_join
 # define pthread_detach GC_pthread_detach
 
-#ifndef GC_DARWIN_THREADS
+#ifndef GC_DARWIN_THREADS 
+# ifdef GC_NETBSD_THREADS
+#  undef pthread_sigmask
+# endif
 # define pthread_sigmask GC_pthread_sigmask
 # define dlopen GC_dlopen
 #endif
index cc0410d441f6955906f8473fa971ed76224ebc98..0e978ea950ec4ef9fde2e84f753ed6d407fe83d1 100644 (file)
@@ -1956,7 +1956,7 @@ void GC_err_puts GC_PROTO((GC_CONST char *s));
   /* in Linux glibc, but it's not exported.)  Thus we continue to use  */
   /* the same hard-coded signals we've always used.                    */
 #  if !defined(SIG_SUSPEND)
-#   if defined(GC_LINUX_THREADS) || defined(GC_DGUX386_THREADS)
+#   if defined(GC_LINUX_THREADS) || defined(GC_DGUX386_THREADS) || defined(GC_NETBSD_THREADS)
 #    if defined(SPARC) && !defined(SIGPWR)
        /* SPARC/Linux doesn't properly define SIGPWR in <signal.h>.
         * It is aliased to SIGLOST in asm/signal.h, though.            */
index 0346a8022a6dcff525eb9b899c9ed933ff1c42b2..68084bd61874464b4ae34adcb2224d6db1dcfe77 100644 (file)
@@ -67,8 +67,8 @@
 # endif
 
 # if (defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) || \
-      defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)) \
-      && !defined(USE_PTHREAD_SPECIFIC)
+      defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)) || \
+      defined(GC_NETBSD_THREADS) && !defined(USE_PTHREAD_SPECIFIC)
 #   define USE_PTHREAD_SPECIFIC
 # endif
 
 # include <sys/sysctl.h>
 #endif /* GC_DARWIN_THREADS */
 
+#if defined(GC_NETBSD_THREADS)
+# include <sys/param.h>
+# include <sys/sysctl.h>
+#endif
+
 
 
 #if defined(GC_DGUX386_THREADS)
@@ -1013,7 +1018,7 @@ void GC_thr_init()
          GC_nprocs = sysconf(_SC_NPROC_ONLN);
          if (GC_nprocs <= 0) GC_nprocs = 1;
 #       endif
-#       if defined(GC_DARWIN_THREADS) || defined(GC_FREEBSD_THREADS)
+#       if defined(GC_DARWIN_THREADS) || defined(GC_FREEBSD_THREADS) || defined(GC_NETBSD_THREADS)
          int ncpus = 1;
          size_t len = sizeof(ncpus);
          sysctl((int[2]) {CTL_HW, HW_NCPU}, 2, &ncpus, &len, NULL, 0);
index 7d5d8894d81039f43bc4cfffdefe09df275d91ce..0de67ffda4081e91936fc347d0d0f3398ed31f96 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "private/gc_priv.h" /* For GC_compare_and_exchange, GC_memory_barrier */
 
-#if defined(GC_LINUX_THREADS)
+#if defined(GC_LINUX_THREADS) || defined(GC_NETBSD_THREADS)
 
 #include "private/specific.h"