summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2011-07-14 14:18:14 +0000
committerbz <bz@FreeBSD.org>2011-07-14 14:18:14 +0000
commit8448ba638c9a5737f9eed2cac07f44300a91aeb8 (patch)
tree1afc60e746e75165a27b6764cbbf83a768420f88 /sys/compat
parent7c690c1aa838ce557a7140db128970d6149b34d6 (diff)
downloadFreeBSD-src-8448ba638c9a5737f9eed2cac07f44300a91aeb8.zip
FreeBSD-src-8448ba638c9a5737f9eed2cac07f44300a91aeb8.tar.gz
Remove semaphore map entry count "semmap" field and its tuning
option that is highly recommended to be adjusted in too much documentation while doing nothing in FreeBSD since r2729 (rev 1.1). ipcs(1) needs to be recompiled as it is accessing _KERNEL private variables. Reviewed by: jhb (before comment change on linux code) Sponsored by: Sandvine Incorporated
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_ipc.c10
1 files changed, 9 insertions, 1 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
OpenPOWER on IntegriCloud