diff options
author | dufault <dufault@FreeBSD.org> | 1998-03-28 11:51:01 +0000 |
---|---|---|
committer | dufault <dufault@FreeBSD.org> | 1998-03-28 11:51:01 +0000 |
commit | 8ed0defc6e5c9d291026302e0d45357454484c5d (patch) | |
tree | 805e852c0dbabdcdb6254773c9023caa32928e3a /sys/kern/posix4_mib.c | |
parent | cd450d67141a2e84500ff624dc9d39c255a7de77 (diff) | |
download | FreeBSD-src-8ed0defc6e5c9d291026302e0d45357454484c5d.zip FreeBSD-src-8ed0defc6e5c9d291026302e0d45357454484c5d.tar.gz |
Finish _POSIX_PRIORITY_SCHEDULING. Needs P1003_1B and
_KPOSIX_PRIORITY_SCHEDULING options to work. Changes:
Change all "posix4" to "p1003_1b". Misnamed files are left
as "posix4" until I'm told if I can simply delete them and add
new ones;
Add _POSIX_PRIORITY_SCHEDULING system calls for FreeBSD and Linux;
Add man pages for _POSIX_PRIORITY_SCHEDULING system calls;
Add options to LINT;
Minor fixes to P1003_1B code during testing.
Diffstat (limited to 'sys/kern/posix4_mib.c')
-rw-r--r-- | sys/kern/posix4_mib.c | 83 |
1 files changed, 50 insertions, 33 deletions
diff --git a/sys/kern/posix4_mib.c b/sys/kern/posix4_mib.c index 84532b8..523f76b 100644 --- a/sys/kern/posix4_mib.c +++ b/sys/kern/posix4_mib.c @@ -34,44 +34,61 @@ #include <sys/param.h> #include <sys/kernel.h> #include <sys/sysctl.h> -#include <sys/unistd.h> +#include <posix4/posix4.h> -static int facility[CTL_POSIX4_N_CTLS]; +static int facility[CTL_P1003_1B_MAXID - 1]; + +/* OID_AUTO isn't working with sysconf(3). I guess I'd have to + * modify it to do a lookup by name from the index. + * For now I've left it a top-level sysctl. + */ + +#if 1 + +#define P1B_SYSCTL(num, name) \ +SYSCTL_INT(_p1003_1b, num, \ + name, CTLFLAG_RD, facility + num - 1, 0, ""); + +#else + +#define P1B_SYSCTL(num, name) \ +SYSCTL_INT(_kern_p1003_1b, OID_AUTO, \ + name, CTLFLAG_RD, facility + num - 1, 0, ""); +SYSCTL_NODE(_kern, OID_AUTO, p1003_1b, CTLFLAG_RW, 0, "P1003.1B"); + +#endif -#define P4_SYSCTL(num, name) \ - SYSCTL_INT(_posix4, num, name, CTLFLAG_RD, facility + num - 1, 0, ""); -P4_SYSCTL(CTL_POSIX4_ASYNCHRONOUS_IO, asynchronous_io); -P4_SYSCTL(CTL_POSIX4_MAPPED_FILES, mapped_files); -P4_SYSCTL(CTL_POSIX4_MEMLOCK, memlock); -P4_SYSCTL(CTL_POSIX4_MEMLOCK_RANGE, memlock_range); -P4_SYSCTL(CTL_POSIX4_MEMORY_PROTECTION, memory_protection); -P4_SYSCTL(CTL_POSIX4_MESSAGE_PASSING, message_passing); -P4_SYSCTL(CTL_POSIX4_PRIORITIZED_IO, prioritized_io); -P4_SYSCTL(CTL_POSIX4_PRIORITY_SCHEDULING, priority_scheduling); -P4_SYSCTL(CTL_POSIX4_REALTIME_SIGNALS, realtime_signals); -P4_SYSCTL(CTL_POSIX4_SEMAPHORES, semaphores); -P4_SYSCTL(CTL_POSIX4_FSYNC, fsync); -P4_SYSCTL(CTL_POSIX4_SHARED_MEMORY_OBJECTS, shared_memory_objects); -P4_SYSCTL(CTL_POSIX4_SYNCHRONIZED_IO, synchronized_io); -P4_SYSCTL(CTL_POSIX4_TIMERS, timers); -P4_SYSCTL(CTL_POSIX4_AIO_LISTIO_MAX, aio_listio_max); -P4_SYSCTL(CTL_POSIX4_AIO_MAX, aio_max); -P4_SYSCTL(CTL_POSIX4_AIO_PRIO_DELTA_MAX, aio_prio_delta_max); -P4_SYSCTL(CTL_POSIX4_DELAYTIMER_MAX, delaytimer_max); -P4_SYSCTL(CTL_POSIX4_MQ_OPEN_MAX, mq_open_max); -P4_SYSCTL(CTL_POSIX4_PAGESIZE, pagesize); -P4_SYSCTL(CTL_POSIX4_RTSIG_MAX, rtsig_max); -P4_SYSCTL(CTL_POSIX4_SEM_NSEMS_MAX, sem_nsems_max); -P4_SYSCTL(CTL_POSIX4_SEM_VALUE_MAX, sem_value_max); -P4_SYSCTL(CTL_POSIX4_SIGQUEUE_MAX, sigqueue_max); -P4_SYSCTL(CTL_POSIX4_TIMER_MAX, timer_max); +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_LISTIO_MAX, aio_listio_max); +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(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); -/* posix4_facility: Set a facility to a value. This is - * probably a temporary measure until the LKM code is combined with this. +/* p31b_setcfg: Set the configuration */ -void posix4_facility(int num, int value) +void p31b_setcfg(int num, int value) { - if (num >= 1 && num <= CTL_POSIX4_N_CTLS) + if (num >= 1 && num < CTL_P1003_1B_MAXID) facility[num - 1] = value; } |