7e2b69dc2b
- Add patch so mono doesn't segfault on PPC SMP machines - Minor spec cleanup
27 lines
792 B
Diff
27 lines
792 B
Diff
#! /bin/sh /usr/share/dpatch/dpatch-run
|
|
## ppc-sched-affinity.dpatch by <haleb@localhost.localdomain>
|
|
##
|
|
## All lines beginning with `## DP:' are a description of the patch.
|
|
## DP: No description.
|
|
|
|
@DPATCH@
|
|
diff -urNad mono-1.1.13.2~/mono/mini/main.c mono-1.1.13.2/mono/mini/main.c
|
|
--- mono-1.1.13.2~/mono/mini/main.c 2004-12-10 19:01:25.000000000 -0500
|
|
+++ mono-1.1.13.2/mono/mini/main.c 2006-02-16 12:04:28.000000000 -0500
|
|
@@ -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);
|
|
}
|
|
|