FreeBSD kernel kern code
posix4_mib.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/queue.h>
#include <sys/sysctl.h>
#include <sys/vnode.h>
#include <sys/proc.h>
#include <sys/posix4.h>
Include dependency graph for posix4_mib.c:

Go to the source code of this file.

Macros

#define P1B_SYSCTL(num, name)
 
#define P1B_SYSCTL_RW(num, name)
 
#define P31B_VALID(num)   ((num) >= 1 && (num) < CTL_P1003_1B_MAXID)
 

Functions

 __FBSDID ("$FreeBSD$")
 
static int p31b_sysctl_proc (SYSCTL_HANDLER_ARGS)
 
 SYSCTL_DECL (_p1003_1b)
 
 P1B_SYSCTL (CTL_P1003_1B_ASYNCHRONOUS_IO, asynchronous_io)
 
 P1B_SYSCTL (CTL_P1003_1B_MAPPED_FILES, mapped_files)
 
 P1B_SYSCTL (CTL_P1003_1B_MEMLOCK, memlock)
 
 P1B_SYSCTL (CTL_P1003_1B_MEMLOCK_RANGE, memlock_range)
 
 P1B_SYSCTL (CTL_P1003_1B_MEMORY_PROTECTION, memory_protection)
 
 P1B_SYSCTL (CTL_P1003_1B_MESSAGE_PASSING, message_passing)
 
 P1B_SYSCTL (CTL_P1003_1B_PRIORITIZED_IO, prioritized_io)
 
 P1B_SYSCTL (CTL_P1003_1B_PRIORITY_SCHEDULING, priority_scheduling)
 
 P1B_SYSCTL (CTL_P1003_1B_REALTIME_SIGNALS, realtime_signals)
 
 P1B_SYSCTL (CTL_P1003_1B_SEMAPHORES, semaphores)
 
 P1B_SYSCTL (CTL_P1003_1B_FSYNC, fsync)
 
 P1B_SYSCTL (CTL_P1003_1B_SHARED_MEMORY_OBJECTS, shared_memory_objects)
 
 P1B_SYSCTL (CTL_P1003_1B_SYNCHRONIZED_IO, synchronized_io)
 
 P1B_SYSCTL (CTL_P1003_1B_TIMERS, timers)
 
 P1B_SYSCTL (CTL_P1003_1B_AIO_MAX, aio_max)
 
 P1B_SYSCTL (CTL_P1003_1B_AIO_PRIO_DELTA_MAX, aio_prio_delta_max)
 
 P1B_SYSCTL (CTL_P1003_1B_DELAYTIMER_MAX, delaytimer_max)
 
 P1B_SYSCTL (CTL_P1003_1B_MQ_OPEN_MAX, mq_open_max)
 
 P1B_SYSCTL (CTL_P1003_1B_PAGESIZE, pagesize)
 
 P1B_SYSCTL (CTL_P1003_1B_RTSIG_MAX, rtsig_max)
 
 P1B_SYSCTL_RW (CTL_P1003_1B_SEM_NSEMS_MAX, sem_nsems_max)
 
 P1B_SYSCTL (CTL_P1003_1B_SEM_VALUE_MAX, sem_value_max)
 
 P1B_SYSCTL (CTL_P1003_1B_SIGQUEUE_MAX, sigqueue_max)
 
 P1B_SYSCTL (CTL_P1003_1B_TIMER_MAX, timer_max)
 
void p31b_setcfg (int num, int value)
 
void p31b_unsetcfg (int num)
 
int p31b_getcfg (int num)
 
int p31b_iscfg (int num)
 
static void p31b_set_standard (void *dummy)
 
 SYSINIT (p31b_set_standard, SI_SUB_P1003_1B, SI_ORDER_ANY, p31b_set_standard, NULL)
 

Variables

static int facility [CTL_P1003_1B_MAXID - 1]
 
static int facility_initialized [CTL_P1003_1B_MAXID - 1]
 

Macro Definition Documentation

◆ P1B_SYSCTL

#define P1B_SYSCTL (   num,
  name 
)
Value:
SYSCTL_INT(_p1003_1b, num, name, CTLFLAG_RD | CTLFLAG_CAPRD, \
facility + num - 1, 0, "");
const char * name
Definition: kern_fail.c:145
SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, enable, CTLFLAG_RWTUN, &__elfN(aslr_enabled), 0, ": enable address map randomization")
static int facility[CTL_P1003_1B_MAXID - 1]
Definition: posix4_mib.c:47

Definition at line 61 of file posix4_mib.c.

◆ P1B_SYSCTL_RW

#define P1B_SYSCTL_RW (   num,
  name 
)
Value:
SYSCTL_PROC(_p1003_1b, num, name, \
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, NULL, num, \
p31b_sysctl_proc, "I", "");
SYSCTL_PROC(_kern_binmisc, OID_AUTO, add, CTLFLAG_MPSAFE|CTLTYPE_STRUCT|CTLFLAG_WR, NULL, IBC_ADD, sysctl_kern_binmisc, "S,ximgact_binmisc_entry", "Add an activator entry")
static int p31b_sysctl_proc(SYSCTL_HANDLER_ARGS)
Definition: posix4_mib.c:112

Definition at line 64 of file posix4_mib.c.

◆ P31B_VALID

#define P31B_VALID (   num)    ((num) >= 1 && (num) < CTL_P1003_1B_MAXID)

Definition at line 109 of file posix4_mib.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ P1B_SYSCTL() [1/23]

P1B_SYSCTL ( CTL_P1003_1B_AIO_MAX  ,
aio_max   
)

◆ P1B_SYSCTL() [2/23]

P1B_SYSCTL ( CTL_P1003_1B_AIO_PRIO_DELTA_MAX  ,
aio_prio_delta_max   
)

◆ P1B_SYSCTL() [3/23]

P1B_SYSCTL ( CTL_P1003_1B_ASYNCHRONOUS_IO  ,
asynchronous_io   
)

◆ P1B_SYSCTL() [4/23]

P1B_SYSCTL ( CTL_P1003_1B_DELAYTIMER_MAX  ,
delaytimer_max   
)

◆ P1B_SYSCTL() [5/23]

P1B_SYSCTL ( CTL_P1003_1B_FSYNC  ,
fsync   
)

◆ P1B_SYSCTL() [6/23]

P1B_SYSCTL ( CTL_P1003_1B_MAPPED_FILES  ,
mapped_files   
)

◆ P1B_SYSCTL() [7/23]

P1B_SYSCTL ( CTL_P1003_1B_MEMLOCK  ,
memlock   
)

◆ P1B_SYSCTL() [8/23]

P1B_SYSCTL ( CTL_P1003_1B_MEMLOCK_RANGE  ,
memlock_range   
)

◆ P1B_SYSCTL() [9/23]

P1B_SYSCTL ( CTL_P1003_1B_MEMORY_PROTECTION  ,
memory_protection   
)

◆ P1B_SYSCTL() [10/23]

P1B_SYSCTL ( CTL_P1003_1B_MESSAGE_PASSING  ,
message_passing   
)

◆ P1B_SYSCTL() [11/23]

P1B_SYSCTL ( CTL_P1003_1B_MQ_OPEN_MAX  ,
mq_open_max   
)

◆ P1B_SYSCTL() [12/23]

P1B_SYSCTL ( CTL_P1003_1B_PAGESIZE  ,
pagesize   
)

◆ P1B_SYSCTL() [13/23]

P1B_SYSCTL ( CTL_P1003_1B_PRIORITIZED_IO  ,
prioritized_io   
)

◆ P1B_SYSCTL() [14/23]

P1B_SYSCTL ( CTL_P1003_1B_PRIORITY_SCHEDULING  ,
priority_scheduling   
)

◆ P1B_SYSCTL() [15/23]

P1B_SYSCTL ( CTL_P1003_1B_REALTIME_SIGNALS  ,
realtime_signals   
)

◆ P1B_SYSCTL() [16/23]

P1B_SYSCTL ( CTL_P1003_1B_RTSIG_MAX  ,
rtsig_max   
)

◆ P1B_SYSCTL() [17/23]

P1B_SYSCTL ( CTL_P1003_1B_SEM_VALUE_MAX  ,
sem_value_max   
)

◆ P1B_SYSCTL() [18/23]

P1B_SYSCTL ( CTL_P1003_1B_SEMAPHORES  ,
semaphores   
)

◆ P1B_SYSCTL() [19/23]

P1B_SYSCTL ( CTL_P1003_1B_SHARED_MEMORY_OBJECTS  ,
shared_memory_objects   
)

◆ P1B_SYSCTL() [20/23]

P1B_SYSCTL ( CTL_P1003_1B_SIGQUEUE_MAX  ,
sigqueue_max   
)

◆ P1B_SYSCTL() [21/23]

P1B_SYSCTL ( CTL_P1003_1B_SYNCHRONIZED_IO  ,
synchronized_io   
)

◆ P1B_SYSCTL() [22/23]

P1B_SYSCTL ( CTL_P1003_1B_TIMER_MAX  ,
timer_max   
)

◆ P1B_SYSCTL() [23/23]

P1B_SYSCTL ( CTL_P1003_1B_TIMERS  ,
timers   
)

◆ P1B_SYSCTL_RW()

P1B_SYSCTL_RW ( CTL_P1003_1B_SEM_NSEMS_MAX  ,
sem_nsems_max   
)

◆ p31b_getcfg()

int p31b_getcfg ( int  num)

Definition at line 147 of file posix4_mib.c.

References facility, and P31B_VALID.

Referenced by ksem_alloc().

Here is the caller graph for this function:

◆ p31b_iscfg()

int p31b_iscfg ( int  num)

Definition at line 156 of file posix4_mib.c.

References facility_initialized, and P31B_VALID.

◆ p31b_set_standard()

static void p31b_set_standard ( void *  dummy)
static

Definition at line 168 of file posix4_mib.c.

References p31b_setcfg().

Here is the call graph for this function:

◆ p31b_setcfg()

void p31b_setcfg ( int  num,
int  value 
)

Definition at line 129 of file posix4_mib.c.

References facility, facility_initialized, P31B_VALID, and value.

Referenced by aio_onceonly(), itimer_start(), ksem_module_destroy(), ksem_module_init(), mqfs_init(), p31b_set_standard(), p31binit(), and sigqueue_start().

Here is the caller graph for this function:

◆ p31b_sysctl_proc()

static int p31b_sysctl_proc ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 112 of file posix4_mib.c.

References facility, facility_initialized, P31B_VALID, and sysctl_handle_int().

Here is the call graph for this function:

◆ p31b_unsetcfg()

void p31b_unsetcfg ( int  num)

Definition at line 139 of file posix4_mib.c.

References facility, and facility_initialized.

Referenced by ksem_module_destroy().

Here is the caller graph for this function:

◆ SYSCTL_DECL()

SYSCTL_DECL ( _p1003_1b  )

◆ SYSINIT()

SYSINIT ( p31b_set_standard  ,
SI_SUB_P1003_1B  ,
SI_ORDER_ANY  ,
p31b_set_standard  ,
NULL   
)

Variable Documentation

◆ facility

int facility[CTL_P1003_1B_MAXID - 1]
static

Definition at line 47 of file posix4_mib.c.

Referenced by p31b_getcfg(), p31b_setcfg(), p31b_sysctl_proc(), and p31b_unsetcfg().

◆ facility_initialized

int facility_initialized[CTL_P1003_1B_MAXID - 1]
static

Definition at line 48 of file posix4_mib.c.

Referenced by p31b_iscfg(), p31b_setcfg(), p31b_sysctl_proc(), and p31b_unsetcfg().