Skip to content

Commit

Permalink
2007-02-01 Geoff Norton <gnorton@customerdna.com>
Browse files Browse the repository at this point in the history
        * 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
Geoff Norton committed Feb 1, 2007
1 parent 061fb79 commit 44e57e9
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 7 deletions.
10 changes: 10 additions & 0 deletions libgc/ChangeLog
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
7 changes: 7 additions & 0 deletions libgc/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion libgc/include/gc_config_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion libgc/include/gc_pthread_redirects.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion libgc/include/private/gc_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
11 changes: 8 additions & 3 deletions libgc/pthread_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion libgc/specific.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 44e57e9

Please sign in to comment.