mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-15 04:59:27 +08:00
Add SMP sysctls
This commit is contained in:
@@ -44,6 +44,7 @@
|
|||||||
#include <rtems/bsd/sys/types.h>
|
#include <rtems/bsd/sys/types.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
#include <sys/kernel.h>
|
#include <sys/kernel.h>
|
||||||
|
#include <sys/sysctl.h>
|
||||||
#include <rtems/bsd/sys/lock.h>
|
#include <rtems/bsd/sys/lock.h>
|
||||||
#include <sys/mutex.h>
|
#include <sys/mutex.h>
|
||||||
#include <sys/proc.h>
|
#include <sys/proc.h>
|
||||||
@@ -73,6 +74,17 @@ int maxusers; /* base tunable */
|
|||||||
struct bintime boottimebin;
|
struct bintime boottimebin;
|
||||||
struct timeval boottime;
|
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_status_code
|
||||||
rtems_bsd_initialize(void)
|
rtems_bsd_initialize(void)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user