[Mono-dev] mono/mini/driver.c patch for RHEL3 compatability

C.J. Adams-Collier cjac at colliertech.org
Wed Dec 19 18:24:19 EST 2007


Hey all

Zoltan asked that I make a change to configure.in as well, but I wanted
to send this before I forgot about it.

Cheers,

C.J.



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- mono/mini/driver.c  2007-12-19 15:04:53.000000000 -0800
+++ mono/mini/patched-driver.c  2007-12-19 15:05:20.000000000 -0800
@@ -706,8 +706,16 @@
 
 #if HAVE_SCHED_SETAFFINITY
        if (getenv ("MONO_NO_SMP")) {
+#  ifdef GLIBC_RHEL3_SCHED_SETAFFINITY
+                cpu_set_t proc_mask;
+                CPU_ZERO(&proc_mask);
+                CPU_SET(0, &proc_mask);
+
+                sched_setaffinity (getpid(), &proc_mask);
+#  else
                unsigned long proc_mask = 1;
                sched_setaffinity (getpid(), sizeof (unsigned long), &proc_mask);
+#  endif
        }
 #endif
        if (!g_thread_supported ())


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20071219/849e658b/attachment.html 


More information about the Mono-devel-list mailing list