summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/compat/linux/linux_ipc.c10
-rw-r--r--sys/conf/NOTES3
-rw-r--r--sys/conf/options1
-rw-r--r--sys/kern/sysv_sem.c7
-rw-r--r--sys/sys/sem.h3
-rw-r--r--usr.bin/ipcs/ipc.c3
-rw-r--r--usr.bin/ipcs/ipcs.c2
7 files changed, 11 insertions, 18 deletions
diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c
index 97cea53..a43de95 100644
--- a/sys/compat/linux/linux_ipc.c
+++ b/sys/compat/linux/linux_ipc.c
@@ -575,7 +575,15 @@ linux_semctl(struct thread *td, struct linux_semctl_args *args)
return (error);
case LINUX_IPC_INFO:
case LINUX_SEM_INFO:
- bcopy(&seminfo, &linux_seminfo, sizeof(linux_seminfo) );
+ bcopy(&seminfo, &linux_seminfo.semmni, sizeof(linux_seminfo) -
+ sizeof(linux_seminfo.semmap) );
+ /*
+ * Linux does not use the semmap field either but populates it
+ * with the defined value from SEMMAP, which really is redefined
+ * to SEMMNS, which they define as SEMMNI * SEMMSL.
+ * Try to simulate this returning our dynamic semmns value.
+ */
+ linux_seminfo.semmap = linux_seminfo.semmns;
/* XXX BSD equivalent?
#define used_semids 10
#define used_sems 10
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index 69378c6..dc44387 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -2833,9 +2833,6 @@ options VERBOSE_SYSINIT
#####################################################################
# SYSV IPC KERNEL PARAMETERS
#
-# Maximum number of entries in a semaphore map.
-options SEMMAP=31
-
# Maximum number of System V semaphores that can be used on the system at
# one time.
options SEMMNI=11
diff --git a/sys/conf/options b/sys/conf/options
index a77a54d..9f1ac80 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -164,7 +164,6 @@ MSGMNI opt_sysvipc.h
MSGSEG opt_sysvipc.h
MSGSSZ opt_sysvipc.h
MSGTQL opt_sysvipc.h
-SEMMAP opt_sysvipc.h
SEMMNI opt_sysvipc.h
SEMMNS opt_sysvipc.h
SEMMNU opt_sysvipc.h
diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c
index 4bbe787..4a4c479 100644
--- a/sys/kern/sysv_sem.c
+++ b/sys/kern/sysv_sem.c
@@ -149,9 +149,6 @@ struct sem_undo {
#endif
/* shouldn't need tuning */
-#ifndef SEMMAP
-#define SEMMAP 30 /* # of entries in semaphore map */
-#endif
#ifndef SEMMSL
#define SEMMSL SEMMNS /* max # of semaphores per id */
#endif
@@ -182,7 +179,6 @@ struct sem_undo {
* semaphore info struct
*/
struct seminfo seminfo = {
- SEMMAP, /* # of entries in semaphore map */
SEMMNI, /* # of semaphore identifiers */
SEMMNS, /* # of semaphores in system */
SEMMNU, /* # of undo structures in system */
@@ -194,8 +190,6 @@ struct seminfo seminfo = {
SEMAEM /* adjust on exit max value */
};
-SYSCTL_INT(_kern_ipc, OID_AUTO, semmap, CTLFLAG_RW, &seminfo.semmap, 0,
- "Number of entries in the semaphore map");
SYSCTL_INT(_kern_ipc, OID_AUTO, semmni, CTLFLAG_RDTUN, &seminfo.semmni, 0,
"Number of semaphore identifiers");
SYSCTL_INT(_kern_ipc, OID_AUTO, semmns, CTLFLAG_RDTUN, &seminfo.semmns, 0,
@@ -255,7 +249,6 @@ seminit(void)
{
int i, error;
- TUNABLE_INT_FETCH("kern.ipc.semmap", &seminfo.semmap);
TUNABLE_INT_FETCH("kern.ipc.semmni", &seminfo.semmni);
TUNABLE_INT_FETCH("kern.ipc.semmns", &seminfo.semmns);
TUNABLE_INT_FETCH("kern.ipc.semmnu", &seminfo.semmnu);
diff --git a/sys/sys/sem.h b/sys/sys/sem.h
index cce28f0..f52bc0c 100644
--- a/sys/sys/sem.h
+++ b/sys/sys/sem.h
@@ -107,8 +107,7 @@ union semun {
* semaphore info struct
*/
struct seminfo {
- int semmap, /* # of entries in semaphore map */
- semmni, /* # of semaphore identifiers */
+ int semmni, /* # of semaphore identifiers */
semmns, /* # of semaphores in system */
semmnu, /* # of undo structures in system */
semmsl, /* max # of semaphores per id */
diff --git a/usr.bin/ipcs/ipc.c b/usr.bin/ipcs/ipc.c
index 14fbe1f..e0601dc 100644
--- a/usr.bin/ipcs/ipc.c
+++ b/usr.bin/ipcs/ipc.c
@@ -73,8 +73,7 @@ struct nlist symbols[] = {
X(shmseg, sizeof(u_long)) \
X(shmall, sizeof(u_long))
-#define SEMINFO_XVEC X(semmap, sizeof(int)) \
- X(semmni, sizeof(int)) \
+#define SEMINFO_XVEC X(semmni, sizeof(int)) \
X(semmns, sizeof(int)) \
X(semmnu, sizeof(int)) \
X(semmsl, sizeof(int)) \
diff --git a/usr.bin/ipcs/ipcs.c b/usr.bin/ipcs/ipcs.c
index 3ddfa25..1d8e354 100644
--- a/usr.bin/ipcs/ipcs.c
+++ b/usr.bin/ipcs/ipcs.c
@@ -474,8 +474,6 @@ print_ksemtotal(struct seminfo seminfo)
{
printf("seminfo:\n");
- printf("\tsemmap: %12d\t(# of entries in semaphore map)\n",
- seminfo.semmap);
printf("\tsemmni: %12d\t(# of semaphore identifiers)\n",
seminfo.semmni);
printf("\tsemmns: %12d\t(# of semaphores in system)\n",
OpenPOWER on IntegriCloud