summaryrefslogtreecommitdiffstats
path: root/sys/kern/posix4_mib.c
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2002-09-19 00:43:32 +0000
committeralfred <alfred@FreeBSD.org>2002-09-19 00:43:32 +0000
commitd063152de15b045caca51218d4f7046ceaf07fbe (patch)
tree03a4032eb3cb9c260f9b522b0e619f27dfa99d94 /sys/kern/posix4_mib.c
parent6ac7d5d588d5761ad6b9baeffb32c74bcff7217b (diff)
downloadFreeBSD-src-d063152de15b045caca51218d4f7046ceaf07fbe.zip
FreeBSD-src-d063152de15b045caca51218d4f7046ceaf07fbe.tar.gz
Add the rest of the kernel support for the sem_ API in kern/uipc_sem.c.
Option 'P1003_1B_SEMAPHORES' to compile them in, or load the "sem" module to activate them. Have kern/makesyscalls.sh emit an include for sys/_semaphore.h into sysproto.h to pull in the typedef for semid_t. Add the syscalls to the syscall table as module stubs.
Diffstat (limited to 'sys/kern/posix4_mib.c')
-rw-r--r--sys/kern/posix4_mib.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/kern/posix4_mib.c b/sys/kern/posix4_mib.c
index 09af27d..d368593 100644
--- a/sys/kern/posix4_mib.c
+++ b/sys/kern/posix4_mib.c
@@ -92,12 +92,23 @@ P1B_SYSCTL(CTL_P1003_1B_TIMER_MAX, timer_max);
/* p31b_setcfg: Set the configuration
*/
-void p31b_setcfg(int num, int value)
+void
+p31b_setcfg(int num, int value)
{
+
if (num >= 1 && num < CTL_P1003_1B_MAXID)
facility[num - 1] = value;
}
+int
+p31b_getcfg(int num)
+{
+
+ if (num >= 1 && num < CTL_P1003_1B_MAXID)
+ return (facility[num - 1]);
+ return (0);
+}
+
/*
* Turn on indications for standard (non-configurable) kernel features.
*/
OpenPOWER on IntegriCloud