* system.c: check the number of online processors instead of the
existing ones. Sanitize return value if it's an error.
svn path=/trunk/mono/; revision=34650
+2004-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * system.c: check the number of online processors instead of the
+ existing ones. Sanitize return value if it's an error.
+
2004-10-03 Ben Maurer <bmaurer@ximian.com>
* system.c: Add support for getting the # of cpus.
info->dwPageSize=getpagesize();
/* Fill in the rest of this junk. Maybe with libgtop */
-#ifdef _SC_NPROCESSORS_CONF
- info->dwNumberOfProcessors = sysconf (_SC_NPROCESSORS_CONF);
+#ifdef _SC_NPROCESSORS_ONLN
+ info->dwNumberOfProcessors = sysconf (_SC_NPROCESSORS_ONLN);
+ if (info->dwNumberOfProcessors <= 0)
+ info->dwNumberOfProcessors = 1;
#else
info->dwNumberOfProcessors = 1;
#endif