After reading some documents, I realized SIGEV_NONE != NULL, also
fix code in mqueue_send_notification to handle SIGEV_NONE.
This commit is contained in:
parent
9947b45978
commit
052ea11c71
@ -1694,11 +1694,13 @@ mqueue_send_notification(struct mqueue *mq)
|
||||
|
||||
mtx_assert(&mq->mq_mutex, MA_OWNED);
|
||||
nt = mq->mq_notifier;
|
||||
p = nt->nt_proc;
|
||||
PROC_LOCK(p);
|
||||
if (!KSI_ONQ(&nt->nt_ksi))
|
||||
psignal_event(p, &nt->nt_sigev, &nt->nt_ksi);
|
||||
PROC_UNLOCK(p);
|
||||
if (nt->nt_sigev.sigev_notify != SIGEV_NONE) {
|
||||
p = nt->nt_proc;
|
||||
PROC_LOCK(p);
|
||||
if (!KSI_ONQ(&nt->nt_ksi))
|
||||
psignal_event(p, &nt->nt_sigev, &nt->nt_ksi);
|
||||
PROC_UNLOCK(p);
|
||||
}
|
||||
mq->mq_notifier = NULL;
|
||||
}
|
||||
|
||||
@ -2191,7 +2193,7 @@ mq_notify(struct thread *td, struct mq_notify_args *uap)
|
||||
if (uap->sigev != NULL) {
|
||||
if (mq->mq_notifier != NULL) {
|
||||
error = EBUSY;
|
||||
} else if (ev.sigev_notify != SIGEV_NONE) {
|
||||
} else {
|
||||
PROC_LOCK(p);
|
||||
nt = notifier_search(p, uap->mqd);
|
||||
if (nt == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user