linamh/dev-lang/mono/files/mono-2.0-ppc-threading.patch

21 lines
498 B
Diff
Raw Normal View History

--- 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);
}