summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/rtems/rtems-bsd-init.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-01-29 08:24:58 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-01-29 08:51:47 +0100
commit513e2344de7e55bf236845ecb339a326755bff5b (patch)
tree4529de6d7df05583db6dad28c12c52bfc6d28836 /rtemsbsd/rtems/rtems-bsd-init.c
parentZONE(9): Use page allocator (diff)
downloadrtems-libbsd-513e2344de7e55bf236845ecb339a326755bff5b.tar.bz2
Add SMP sysctls
Diffstat (limited to 'rtemsbsd/rtems/rtems-bsd-init.c')
-rw-r--r--rtemsbsd/rtems/rtems-bsd-init.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/rtemsbsd/rtems/rtems-bsd-init.c b/rtemsbsd/rtems/rtems-bsd-init.c
index b585f7a5..43c19529 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)
{