aboutsummaryrefslogtreecommitdiff
path: root/sys/sys
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2005-11-30 05:12:03 +0000
committerDavid Xu <davidxu@FreeBSD.org>2005-11-30 05:12:03 +0000
commitb2f92ef96bea420474618aaba46a4f17d5144d11 (patch)
treedd58fac4b1e67b3b84318bcdf4611733ffd150f0 /sys/sys
parent908801933a06250bf6e569c8df9e1e00e3403588 (diff)
downloadsrc-b2f92ef96bea420474618aaba46a4f17d5144d11.tar.gz
src-b2f92ef96bea420474618aaba46a4f17d5144d11.zip
Last step to make mq_notify conform to POSIX standard, If the process
has successfully attached a notification request to the message queue via a queue descriptor, file closing should remove the attachment.
Notes
Notes: svn path=/head/; revision=152948
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/mqueue.h5
-rw-r--r--sys/sys/proc.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/sys/sys/mqueue.h b/sys/sys/mqueue.h
index 7c8a2d60f826..36e89fa21e34 100644
--- a/sys/sys/mqueue.h
+++ b/sys/sys/mqueue.h
@@ -37,4 +37,9 @@ struct mq_attr {
long __reserved[4]; /* Ignored for input, zeroed for output */
};
+#ifdef _KERNEL
+struct thread;
+struct file;
+extern void (*mq_fdclose)(struct thread *td, int fd, struct file *fp);
+#endif
#endif
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index b997e21078bb..e51f632b564f 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -158,6 +158,7 @@ struct sleepqueue;
struct td_sched;
struct trapframe;
struct turnstile;
+struct mqueue_notifier;
/*
* Here we define the three structures used for process information.
@@ -609,6 +610,7 @@ struct proc {
struct label *p_label; /* (*) Proc (not subject) MAC label. */
struct p_sched *p_sched; /* (*) Scheduler-specific data. */
STAILQ_HEAD(, ktr_request) p_ktr; /* (o) KTR event queue. */
+ LIST_HEAD(, mqueue_notifier) p_mqnotifier; /* (c) mqueue notifiers.*/
};
#define p_session p_pgrp->pg_session