git: 289b2d6a7980 - main - mqueue: Export some functions to be used by Linuxulator
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 23 May 2024 19:42:13 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=289b2d6a79801f44adc787728cfc8219d39ec076
commit 289b2d6a79801f44adc787728cfc8219d39ec076
Author: Ricardo Branco <rbranco@suse.de>
AuthorDate: 2024-05-17 20:31:16 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-05-23 19:40:46 +0000
mqueue: Export some functions to be used by Linuxulator
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1248
---
sys/kern/uipc_mqueue.c | 6 +++---
sys/sys/mqueue.h | 6 ++++++
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c
index 9276c918565f..b48abf8788f6 100644
--- a/sys/kern/uipc_mqueue.c
+++ b/sys/kern/uipc_mqueue.c
@@ -2003,7 +2003,7 @@ notifier_remove(struct proc *p, struct mqueue *mq, int fd)
PROC_UNLOCK(p);
}
-static int
+int
kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode,
const struct mq_attr *attr)
{
@@ -2223,7 +2223,7 @@ getmq_write(struct thread *td, int fd, struct file **fpp,
fpp, ppn, pmq);
}
-static int
+int
kern_kmq_setattr(struct thread *td, int mqd, const struct mq_attr *attr,
struct mq_attr *oattr)
{
@@ -2329,7 +2329,7 @@ out:
return (error);
}
-static int
+int
kern_kmq_notify(struct thread *td, int mqd, struct sigevent *sigev)
{
struct filedesc *fdp;
diff --git a/sys/sys/mqueue.h b/sys/sys/mqueue.h
index 50f6681ce218..78f34c197c7e 100644
--- a/sys/sys/mqueue.h
+++ b/sys/sys/mqueue.h
@@ -38,8 +38,14 @@ struct mq_attr {
};
#ifdef _KERNEL
+struct sigevent;
struct thread;
struct file;
extern void (*mq_fdclose)(struct thread *td, int fd, struct file *fp);
+int kern_kmq_notify(struct thread *, int, struct sigevent *);
+int kern_kmq_open(struct thread *, const char *, int, mode_t,
+ const struct mq_attr *);
+int kern_kmq_setattr(struct thread *, int, const struct mq_attr *,
+ struct mq_attr *);
#endif
#endif