From 83714691d0a2e2d876832364e45e1fb529068472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Wed, 3 Jun 2020 08:00:07 +0000 Subject: [PATCH] number of cores with userland cat --- README.adoc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.adoc b/README.adoc index 1b70be8..1cc062e 100644 --- a/README.adoc +++ b/README.adoc @@ -11016,12 +11016,23 @@ cat /proc/cpuinfo getconf _NPROCESSORS_CONF .... -Or from <>, we can use <> with link:userland/linux/sysconf.c[] or <>'s link:userland/cpp/thread_hardware_concurrency.cpp[]: +Or from <>, we can use either of: +* <> with link:userland/linux/sysconf.c[] ++ .... ./run --cpus 2 --emulator gem5 --userland userland/linux/sysconf.c | grep _SC_NPROCESSORS_ONLN +.... +* <>'s link:userland/cpp/thread_hardware_concurrency.cpp[]: ++ +.... ./run --cpus 2 --emulator gem5 --userland userland/cpp/thread_hardware_concurrency.cpp .... +* direct access to several special filesystem files that contain this information e.g. via link:userland/c/cat.c[]: ++ +.... +./run --cpus 2 --emulator gem5 --userland userland/c/cat.c --cli-args /proc/cpuinfo +.... ====== QEMU user mode multithreading