[rtems-libbsd commit] Add SMP sysctls

Sebastian Huber sebh at rtems.org
Thu Jan 29 08:32:05 UTC 2015


Module:    rtems-libbsd
Branch:    master
Commit:    513e2344de7e55bf236845ecb339a326755bff5b
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=513e2344de7e55bf236845ecb339a326755bff5b

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Jan 29 08:24:58 2015 +0100

Add SMP sysctls

---

 rtemsbsd/rtems/rtems-bsd-init.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/rtemsbsd/rtems/rtems-bsd-init.c b/rtemsbsd/rtems/rtems-bsd-init.c
index b585f7a..43c1952 100644
--- a/rtemsbsd/rtems/rtems-bsd-init.c
+++ b/rtemsbsd/rtems/rtems-bsd-init.c
@@ -44,6 +44,7 @@
 #include <rtems/bsd/sys/types.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
+#include <sys/sysctl.h>
 #include <rtems/bsd/sys/lock.h>
 #include <sys/mutex.h>
 #include <sys/proc.h>
@@ -73,6 +74,17 @@ int maxusers;     /* base tunable */
 struct bintime boottimebin;
 struct timeval boottime;
 
+static SYSCTL_NODE(_kern, OID_AUTO, smp, CTLFLAG_RD|CTLFLAG_CAPRD, NULL,
+    "Kernel SMP");
+
+static int one = 1;
+
+SYSCTL_INT(_kern_smp, OID_AUTO, maxid, CTLFLAG_RD|CTLFLAG_CAPRD, &one, 0,
+    "Max CPU ID.");
+
+SYSCTL_INT(_kern_smp, OID_AUTO, maxcpus, CTLFLAG_RD|CTLFLAG_CAPRD, &one,
+    0, "Max number of CPUs that the system was compiled for.");
+
 rtems_status_code
 rtems_bsd_initialize(void)
 {




More information about the vc mailing list