Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Nagy <robert@openbsd.org>2010-11-29 17:56:37 +0300
committerZoltan Varga <vargaz@gmail.com>2010-11-29 19:05:46 +0300
commit065506369b2f69c1104e6059ae884a205b414273 (patch)
treeda4ab0b7163f86cd4a17482d88cb869b6ebcc712 /libgc/pthread_support.c
parentf2e095f92cd1829f515e014779378240d3ae0e8e (diff)
Add support for the internal boehm-gc on OpenBSD
Diffstat (limited to 'libgc/pthread_support.c')
-rw-r--r--libgc/pthread_support.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libgc/pthread_support.c b/libgc/pthread_support.c
index 2d54a513d01..c307ac0eec5 100644
--- a/libgc/pthread_support.c
+++ b/libgc/pthread_support.c
@@ -68,7 +68,8 @@
# if (defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) || \
defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)) || \
- defined(GC_NETBSD_THREADS) && !defined(USE_PTHREAD_SPECIFIC)
+ defined(GC_NETBSD_THREADS) && !defined(USE_PTHREAD_SPECIFIC) || \
+ defined(GC_OPENBSD_THREADS)
# define USE_PTHREAD_SPECIFIC
# endif
@@ -129,7 +130,7 @@
# include <sys/sysctl.h>
#endif /* GC_DARWIN_THREADS */
-#if defined(GC_NETBSD_THREADS)
+#if defined(GC_NETBSD_THREADS) || defined(GC_OPENBSD_THREADS)
# include <sys/param.h>
# include <sys/sysctl.h>
#endif
@@ -1040,7 +1041,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) || defined(GC_NETBSD_THREADS)
+# if defined(GC_DARWIN_THREADS) || defined(GC_FREEBSD_THREADS) || defined(GC_NETBSD_THREADS) || defined(GC_OPENBSD_THREADS)
int ncpus = 1;
size_t len = sizeof(ncpus);
sysctl((int[2]) {CTL_HW, HW_NCPU}, 2, &ncpus, &len, NULL, 0);
@@ -1116,7 +1117,7 @@ void GC_init_parallel()
}
-#if !defined(GC_DARWIN_THREADS)
+#if !defined(GC_DARWIN_THREADS) && !defined(GC_OPENBSD_THREADS)
int WRAP_FUNC(pthread_sigmask)(int how, const sigset_t *set, sigset_t *oset)
{
sigset_t fudged_set;