linamh/dev-lang/mono/files/mono-2.0-ppc-threading.patch
geos_one be5cae4b16 add new mono version
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@1476 6952d904-891a-0410-993b-d76249ca496b
2009-08-22 00:44:22 +00:00

21 lines
498 B
Diff

--- mono-2.0/mono/mini/main.c 2008-08-03 07:49:23.000000000 +0100
+++ mono-2.0/mono/mini/main-new.c 2008-08-03 07:55:10.000000000 +0100
@@ -23,10 +23,16 @@
}
#else
-
+#include <sched.h>
int
main (int argc, char* argv[])
{
+ /* On PowerPC call sched_setaffinity to bind to one CPU only
+ * to work around parallelism bug on G5 SMP */
+ #ifdef __powerpc__
+ unsigned long mask = 1;
+ sched_setaffinity(0, sizeof(mask), &mask);
+ #endif
return mono_main (argc, argv);
}