pkgsrc/lang/mono/patches/patch-ak
2008-02-13 14:16:43 +00:00

26 lines
737 B
Text

$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 */
+#undef nanosleep
+#undef usleep
+#undef sleep
+
+/* A wrapper for the standard C nanosleep function */
+int WRAP_FUNC(nanosleep) (const struct timespec *rqtp, struct timespec *rmtp)
+{
+ int result;
+
+ GC_start_blocking();
+ result = REAL_FUNC(nanosleep)(rqtp, rmtp);
+ GC_end_blocking();
+
+ return result;
+}
+
/* A wrapper for the standard C sleep function */
int WRAP_FUNC(sleep) (unsigned int seconds)
{