代码拉取完成,页面将自动刷新
--- procinfo-18/procinfo.c.mharris-use-sysconf 2004-01-16 15:40:37.000000000 -0500
+++ procinfo-18/procinfo.c 2004-01-17 02:01:16.000000000 -0500
@@ -837,19 +837,7 @@
}
/* Count number of CPUs */
- cpuinfofp = myfopen (PROC_DIR "cpuinfo");
- if (cpuinfofp) {
- while (fgets (line, sizeof (line), cpuinfofp))
- if (!strncmp ("processor", line, 9)) /* intel */
- nr_cpus++;
- else if (!strncmp ("ncpus ", line, 6)) /* sparc */
- nr_cpus = atoi(line+19);
- else if (!strncmp ("cpus detected", line, 13)) /* alpha */
- nr_cpus = atoi(line+27);
- fclose (cpuinfofp);
- }
- if (nr_cpus == 0)
- nr_cpus = 1;
+ nr_cpus = sysconf (_SC_NPROCESSORS_ONLN);
/* Gets called from winsz(), but in case stdout is redirected: */
version = make_version (versionfp);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。