summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_mqueue.c
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2005-12-06 06:22:12 +0000
committerdavidxu <davidxu@FreeBSD.org>2005-12-06 06:22:12 +0000
commit34bbe012ae7c4e2b43853c9436502ce7ac2bb33e (patch)
tree5e1651d299c19d8be080baf6a22eb964eb58b2a4 /sys/kern/uipc_mqueue.c
parent8b2fcc7e4b2946cc3aac41be8cbfde966006785f (diff)
downloadFreeBSD-src-34bbe012ae7c4e2b43853c9436502ce7ac2bb33e.zip
FreeBSD-src-34bbe012ae7c4e2b43853c9436502ce7ac2bb33e.tar.gz
o Turn on MPSAFE flag for mqueuefs.
o Reuse si_mqd field in siginfo_t, this also gives userland information about which descriptor is notified.
Diffstat (limited to 'sys/kern/uipc_mqueue.c')
-rw-r--r--sys/kern/uipc_mqueue.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c
index eb07a35..adb5bb5 100644
--- a/sys/kern/uipc_mqueue.c
+++ b/sys/kern/uipc_mqueue.c
@@ -154,7 +154,6 @@ struct mqueue_notifier {
struct sigevent nt_sigev;
ksiginfo_t nt_ksi;
struct proc *nt_proc;
- int nt_fd;
};
struct mqueue {
@@ -548,7 +547,7 @@ mqfs_mount(struct mount *mp, struct thread *td)
mp->mnt_data = &mqfs_data;
mp->mnt_flag |= MNT_LOCAL;
- /* mp->mnt_kern_flag |= MNTK_MPSAFE; */
+ mp->mnt_kern_flag |= MNTK_MPSAFE;
vfs_getnewfsid(mp);
sbp = &mp->mnt_stat;
@@ -1840,7 +1839,7 @@ notifier_search(struct proc *p, int fd)
struct mqueue_notifier *nt;
LIST_FOREACH(nt, &p->p_mqnotifier, nt_link) {
- if (nt->nt_fd == fd)
+ if (nt->nt_ksi.ksi_mqd == fd)
break;
}
return (nt);
@@ -2218,7 +2217,7 @@ again:
nt->nt_ksi.ksi_flags |= KSI_INS | KSI_EXT;
nt->nt_ksi.ksi_code = SI_MESGQ;
nt->nt_proc = p;
- nt->nt_fd = uap->mqd;
+ nt->nt_ksi.ksi_mqd = uap->mqd;
notifier_insert(p, nt);
}
nt->nt_sigev = ev;
OpenPOWER on IntegriCloud