summaryrefslogtreecommitdiff
path: root/lang/mono/patches/patch-ak
diff options
context:
space:
mode:
Diffstat (limited to 'lang/mono/patches/patch-ak')
-rw-r--r--lang/mono/patches/patch-ak66
1 files changed, 6 insertions, 60 deletions
diff --git a/lang/mono/patches/patch-ak b/lang/mono/patches/patch-ak
index b09c15eafe3..29ac59e41ff 100644
--- a/lang/mono/patches/patch-ak
+++ b/lang/mono/patches/patch-ak
@@ -1,38 +1,7 @@
-$NetBSD: patch-ak,v 1.7 2006/01/03 08:03:53 recht Exp $
-
---- libgc/pthread_support.c.orig 2005-12-07 06:42:46.000000000 +0100
-+++ libgc/pthread_support.c
-@@ -68,7 +68,7 @@
- # endif
-
- # if (defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) || \
-- defined(GC_DARWIN_THREADS)) && !defined(USE_PTHREAD_SPECIFIC)
-+ defined(GC_DARWIN_THREADS) || defined(GC_NETBSD_THREADS)) && !defined(USE_PTHREAD_SPECIFIC)
- # define USE_PTHREAD_SPECIFIC
- # endif
-
-@@ -120,7 +120,10 @@
- # 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)
- # include <sys/dg_sys_info.h>
-@@ -978,7 +981,7 @@ void GC_thr_init()
- # if defined(GC_FREEBSD_THREADS)
- GC_nprocs = 1;
- # endif
--# if defined(GC_DARWIN_THREADS)
-+# if defined(GC_DARWIN_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);
-@@ -1115,8 +1118,24 @@ void GC_end_blocking(void) {
+$NetBSD: patch-ak,v 1.8 2008/02/13 14:16:43 kefren Exp $
+--- libgc/pthread_support.c.orig 2007-11-09 00:07:02.000000000 +0200
++++ libgc/pthread_support.c 2008-02-05 14:01:40.000000000 +0200
+@@ -1160,6 +1160,22 @@ void GC_end_blocking(void) {
#define __d10_sleep sleep
#endif /* GC_DGUX386_THREADS */
@@ -40,7 +9,7 @@ $NetBSD: patch-ak,v 1.7 2006/01/03 08:03:53 recht Exp $
+#undef usleep
+#undef sleep
+
-+/* A wrapper for the standard C nanosleep function */
++/* A wrapper for the standard C nanosleep function */
+int WRAP_FUNC(nanosleep) (const struct timespec *rqtp, struct timespec *rmtp)
+{
+ int result;
@@ -53,28 +22,5 @@ $NetBSD: patch-ak,v 1.7 2006/01/03 08:03:53 recht Exp $
+}
+
/* A wrapper for the standard C sleep function */
--int WRAP_FUNC(sleep) (unsigned int seconds)
-+unsigned int WRAP_FUNC(sleep) (unsigned int seconds)
+ int WRAP_FUNC(sleep) (unsigned int seconds)
{
- int result;
-
-@@ -1126,6 +1145,19 @@ int WRAP_FUNC(sleep) (unsigned int secon
- return result;
- }
-
-+/* A wrapper for the standard C usleep function */
-+int WRAP_FUNC(usleep) (useconds_t microseconds)
-+{
-+ int result;
-+
-+ GC_start_blocking();
-+ result = REAL_FUNC(usleep)(microseconds);
-+ GC_end_blocking();
-+
-+ return result;
-+}
-+
-+
- struct start_info {
- void *(*start_routine)(void *);
- void *arg;