summaryrefslogtreecommitdiffstats
path: root/sys/kern/sysv_msg.c
diff options
context:
space:
mode:
authordd <dd@FreeBSD.org>2001-05-30 03:28:59 +0000
committerdd <dd@FreeBSD.org>2001-05-30 03:28:59 +0000
commit32b1a4110cf1de04556b2d40372860d40cfa9fd3 (patch)
tree5bb490a33b116d882077493e695f17e0ed11a288 /sys/kern/sysv_msg.c
parent1244169d81cf520b46d83bdda79a63382a1331c5 (diff)
downloadFreeBSD-src-32b1a4110cf1de04556b2d40372860d40cfa9fd3.zip
FreeBSD-src-32b1a4110cf1de04556b2d40372860d40cfa9fd3.tar.gz
Export via sysctl:
* all members of msginfo from sysv_msg.c; * msqids from sysv_msg.c; * sema from sysv_sem.c; and * shmsegs from sysv_shm.c; These will be used by ipcs(1) in non-kvm mode. Reviewed by: tmm
Diffstat (limited to 'sys/kern/sysv_msg.c')
-rw-r--r--sys/kern/sysv_msg.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c
index f2b3ba7..83b9582 100644
--- a/sys/kern/sysv_msg.c
+++ b/sys/kern/sysv_msg.c
@@ -1166,3 +1166,21 @@ msgrcv(p, uap)
p->p_retval[0] = msgsz;
return(0);
}
+
+static int
+sysctl_msqids(SYSCTL_HANDLER_ARGS)
+{
+
+ return (SYSCTL_OUT(req, msqids,
+ sizeof(struct msqid_ds) * msginfo.msgmni));
+}
+
+SYSCTL_DECL(_kern_ipc);
+SYSCTL_INT(_kern_ipc, OID_AUTO, msgmax, CTLFLAG_RD, &msginfo.msgmax, 0, "");
+SYSCTL_INT(_kern_ipc, OID_AUTO, msgmni, CTLFLAG_RD, &msginfo.msgmni, 0, "");
+SYSCTL_INT(_kern_ipc, OID_AUTO, msgmnb, CTLFLAG_RD, &msginfo.msgmnb, 0, "");
+SYSCTL_INT(_kern_ipc, OID_AUTO, msgtql, CTLFLAG_RD, &msginfo.msgtql, 0, "");
+SYSCTL_INT(_kern_ipc, OID_AUTO, msgssz, CTLFLAG_RD, &msginfo.msgssz, 0, "");
+SYSCTL_INT(_kern_ipc, OID_AUTO, msgseg, CTLFLAG_RD, &msginfo.msgseg, 0, "")
+SYSCTL_PROC(_kern_ipc, OID_AUTO, msqids, CTLFLAG_RD,
+ NULL, 0, sysctl_msqids, "", "Message queue IDs");
OpenPOWER on IntegriCloud