mono/mono-1.9.1-ppc-threading.patch

19 lines
503 B
Diff
Raw Permalink Normal View History

--- mono-1.9.1/mono/mini/main.c 2007-11-08 23:07:34.000000000 +0100
+++ mono-1.9.1-gil/mono/mini/main.c 2008-07-16 20:35:09.000000000 +0200
@@ -1,8 +1,15 @@
#include "mini.h"
+#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);
}