Make the sysctls kern.ipc.msgmnb and kern.ipc.msgtql into tunables as

is the case for most other sysctls in the System V IPC message queue
implementation.

PR:		75541
Submitted by:	Sergiy Vyshnevetskiy <serg at vostok dot net>
MFC after:	2 weeks
This commit is contained in:
Robert Watson 2004-12-30 13:56:34 +00:00
parent d7df32073b
commit b36aab857b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=139436

View File

@ -132,6 +132,8 @@ msginit()
TUNABLE_INT_FETCH("kern.ipc.msgssz", &msginfo.msgssz);
msginfo.msgmax = msginfo.msgseg * msginfo.msgssz;
TUNABLE_INT_FETCH("kern.ipc.msgmni", &msginfo.msgmni);
TUNABLE_INT_FETCH("kern.ipc.msgmnb", &msginfo.msgmnb);
TUNABLE_INT_FETCH("kern.ipc.msgtql", &msginfo.msgtql);
msgpool = malloc(msginfo.msgmax, M_MSG, M_WAITOK);
if (msgpool == NULL)
@ -1136,8 +1138,8 @@ sysctl_msqids(SYSCTL_HANDLER_ARGS)
SYSCTL_DECL(_kern_ipc);
SYSCTL_INT(_kern_ipc, OID_AUTO, msgmax, CTLFLAG_RD, &msginfo.msgmax, 0, "");
SYSCTL_INT(_kern_ipc, OID_AUTO, msgmni, CTLFLAG_RDTUN, &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, msgmnb, CTLFLAG_RDTUN, &msginfo.msgmnb, 0, "");
SYSCTL_INT(_kern_ipc, OID_AUTO, msgtql, CTLFLAG_RDTUN, &msginfo.msgtql, 0, "");
SYSCTL_INT(_kern_ipc, OID_AUTO, msgssz, CTLFLAG_RDTUN, &msginfo.msgssz, 0, "");
SYSCTL_INT(_kern_ipc, OID_AUTO, msgseg, CTLFLAG_RDTUN, &msginfo.msgseg, 0, "");
SYSCTL_PROC(_kern_ipc, OID_AUTO, msqids, CTLFLAG_RD,