{
#ifndef WIN32
runtime.cpu_count = sysconf (_SC_NPROCESSORS_ONLN);
+#else
+ SYSTEM_INFO sysinfo;
+ GetSystemInfo( &sysinfo );
+ runtime.cpu_count = sysinfo.dwNumberOfProcessors;
+#endif
/* If we have more than 1 cpu, we should use realtime priority so we can have priority threads */
if (runtime.cpu_count > 1) {
return set_realtime_priority();
}
-#endif
+
return 0;
}
runtime.dbname = NULL;
#ifndef WIN32
runtime.cpu_count = sysconf (_SC_NPROCESSORS_ONLN);
+#else
+ {
+ SYSTEM_INFO sysinfo;
+ GetSystemInfo( &sysinfo );
+ runtime.cpu_count = sysinfo.dwNumberOfProcessors;
+ }
#endif
/* INIT APR and Create the pool context */