diff options
author | davidxu <davidxu@FreeBSD.org> | 2005-12-05 03:23:27 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2005-12-05 03:23:27 +0000 |
commit | d4b584de18111c284e07f765ad260caf17ccfb79 (patch) | |
tree | 97f553e4a68727f9d9bc3a7634ecbb82855bc02a /sys/kern/uipc_mqueue.c | |
parent | 7f18d28b2559b43fcf39ffedb4b96a9bbbb8a046 (diff) | |
download | FreeBSD-src-d4b584de18111c284e07f765ad260caf17ccfb79.zip FreeBSD-src-d4b584de18111c284e07f765ad260caf17ccfb79.tar.gz |
Handle SIGEV_NONE, if notification is SIGEV_NONE, error status and
return status will be set, but no notification will be registered.
Increase hard limit of maxmsg to 100, so posixtestsuite ports can run.
Diffstat (limited to 'sys/kern/uipc_mqueue.c')
-rw-r--r-- | sys/kern/uipc_mqueue.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index e457c62..a5250fd 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -188,7 +188,7 @@ SYSCTL_NODE(_kern, OID_AUTO, mqueue, CTLFLAG_RW, 0, static int default_maxmsg = 10; static int default_msgsize = 1024; -static int maxmsg = 20; +static int maxmsg = 100; SYSCTL_INT(_kern_mqueue, OID_AUTO, maxmsg, CTLFLAG_RW, &maxmsg, 0, "Default maximum messages in queue"); static int maxmsgsize = 16384; @@ -2168,7 +2168,8 @@ mq_notify(struct thread *td, struct mq_notify_args *uap) if (error) return (error); if (ev.sigev_notify != SIGEV_SIGNAL && - ev.sigev_notify != SIGEV_THREAD_ID) + ev.sigev_notify != SIGEV_THREAD_ID && + ev.sigev_notify != SIGEV_NONE) return (EINVAL); if ((ev.sigev_notify == SIGEV_SIGNAL || ev.sigev_notify == SIGEV_THREAD_ID) && @@ -2190,7 +2191,7 @@ again: if (uap->sigev != NULL) { if (mq->mq_notifier != NULL) { error = EBUSY; - } else { + } else if (ev.sigev_notify != SIGEV_NONE) { PROC_LOCK(p); nt = notifier_search(p, uap->mqd); if (nt == NULL) { |