Permalink
Browse files

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.

svn path=/trunk/mono/; revision=72097
  • Loading branch information...
1 parent 061fb79 commit 44e57e92685ebc818da79dfdb5cfe9fce375d6eb Geoff Norton committed Feb 1, 2007
View
@@ -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:
View
@@ -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
@@ -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
@@ -74,7 +74,10 @@
# 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
@@ -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. */
@@ -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
@@ -126,6 +126,11 @@
# 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);
View
@@ -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"

0 comments on commit 44e57e9

Please sign in to comment.