Author: lupus
Date: 2006-05-23 06:24:56 -0400 (Tue, 23 May 2006)
New Revision: 60983
Modified:
trunk/mono/mono/os/ChangeLog
trunk/mono/mono/os/gc_wrapper.h
Log:
Tue May 23 12:17:51 CEST 2006 Paolo Molaro <[EMAIL PROTECTED]>
* gc_wrapper.h: added definitions for the sgen GC.
Modified: trunk/mono/mono/os/ChangeLog
===================================================================
--- trunk/mono/mono/os/ChangeLog 2006-05-23 10:23:12 UTC (rev 60982)
+++ trunk/mono/mono/os/ChangeLog 2006-05-23 10:24:56 UTC (rev 60983)
@@ -1,3 +1,8 @@
+
+Tue May 23 12:17:51 CEST 2006 Paolo Molaro <[EMAIL PROTECTED]>
+
+ * gc_wrapper.h: added definitions for the sgen GC.
+
2006-03-03 Zoltan Varga <[EMAIL PROTECTED]>
* *: Move the contents of the util.c file to metadata/assembly.c.
Modified: trunk/mono/mono/os/gc_wrapper.h
===================================================================
--- trunk/mono/mono/os/gc_wrapper.h 2006-05-23 10:23:12 UTC (rev 60982)
+++ trunk/mono/mono/os/gc_wrapper.h 2006-05-23 10:24:56 UTC (rev 60983)
@@ -53,7 +53,33 @@
#define CreateThread GC_CreateThread
#endif
+#elif defined(HAVE_SGEN_GC)
+
+#if defined(PLATFORM_WIN32)
+#define CreateThread mono_gc_CreateThread
#else
+/* pthread function wrappers */
+#include <pthread.h>
+#include <signal.h>
+
+int mono_gc_pthread_create (pthread_t *new_thread, const pthread_attr_t *attr,
void *(*start_routine)(void *), void *arg);
+int mono_gc_pthread_join (pthread_t thread, void **retval);
+int mono_gc_pthread_detach (pthread_t thread);
+
+#define pthread_create mono_gc_pthread_create
+#define pthread_join mono_gc_pthread_join
+#define pthread_detach mono_gc_pthread_detach
+
+#endif
+
+extern int
+mono_gc_register_root (char *start, size_t size, void *descr);
+extern void mono_gc_base_init (void);
+
+# define MONO_GC_REGISTER_ROOT(x) mono_gc_register_root (&(x), sizeof(x),
NULL)
+# define MONO_GC_PRE_INIT() mono_gc_base_init ()
+
+#else /* not Boehm and not sgen GC */
# define MONO_GC_REGISTER_ROOT(x) /* nop */
# define MONO_GC_PRE_INIT()
#endif
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches