FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include "opt_compat.h"
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/limits.h>
#include <sys/buf.h>
#include <sys/capability.h>
#include <sys/dirent.h>
#include <sys/event.h>
#include <sys/eventhandler.h>
#include <sys/fcntl.h>
#include <sys/file.h>
#include <sys/filedesc.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/module.h>
#include <sys/mount.h>
#include <sys/mqueue.h>
#include <sys/mutex.h>
#include <sys/namei.h>
#include <sys/posix4.h>
#include <sys/poll.h>
#include <sys/priv.h>
#include <sys/proc.h>
#include <sys/queue.h>
#include <sys/sysproto.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/syscallsubr.h>
#include <sys/sysent.h>
#include <sys/sx.h>
#include <sys/sysctl.h>
#include <sys/taskqueue.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <machine/atomic.h>
Go to the source code of this file.
Data Structures | |
struct | mqfs_info |
struct | mqfs_vdata |
struct | mqfs_node |
struct | mqueue_notifier |
struct | mqueue |
struct | mqueue_msg |
Macros | |
#define | MQFS_NAMELEN NAME_MAX |
#define | MQFS_DELEN (8 + MQFS_NAMELEN) |
#define | VTON(vp) (((struct mqfs_vdata *)((vp)->v_data))->mv_node) |
#define | VTOMQ(vp) ((struct mqueue *)(VTON(vp)->mn_data)) |
#define | VFSTOMQFS(m) ((struct mqfs_info *)((m)->mnt_data)) |
#define | FPTOMQ(fp) |
#define | MQ_RSEL 0x01 |
#define | MQ_WSEL 0x02 |
Typedefs | |
typedef int(* | _fgetf) (struct thread *, int, cap_rights_t, struct file **) |
Enumerations | |
enum | mqfs_type_t { mqfstype_none = 0, mqfstype_root, mqfstype_dir, mqfstype_this, mqfstype_parent, mqfstype_file, mqfstype_symlink } |
Functions | |
__FBSDID ("$BSDSUniX$") | |
FEATURE (p1003_1b_mqueue,"POSIX P1003.1B message queues support") | |
TAILQ_HEAD (msgq, mqueue_msg) | |
static | SYSCTL_NODE (_kern, OID_AUTO, mqueue, CTLFLAG_RW, 0,"POSIX real time message queue") |
SYSCTL_INT (_kern_mqueue, OID_AUTO, maxmsg, CTLFLAG_RW,&maxmsg, 0,"Default maximum messages in queue") | |
SYSCTL_INT (_kern_mqueue, OID_AUTO, maxmsgsize, CTLFLAG_RW,&maxmsgsize, 0,"Default maximum message size") | |
SYSCTL_INT (_kern_mqueue, OID_AUTO, maxmq, CTLFLAG_RW,&maxmq, 0,"maximum message queues") | |
SYSCTL_INT (_kern_mqueue, OID_AUTO, curmq, CTLFLAG_RW,&curmq, 0,"current message queue number") | |
static | MALLOC_DEFINE (M_MQUEUEDATA,"mqdata","mqueue data") |
static struct mqfs_node * | mqfs_create_file (struct mqfs_node *parent, const char *name, int namelen, struct ucred *cred, int mode) |
static int | mqfs_destroy (struct mqfs_node *mn) |
static void | mqfs_fileno_alloc (struct mqfs_info *mi, struct mqfs_node *mn) |
static void | mqfs_fileno_free (struct mqfs_info *mi, struct mqfs_node *mn) |
static int | mqfs_allocv (struct mount *mp, struct vnode **vpp, struct mqfs_node *pn) |
static struct mqueue * | mqueue_alloc (const struct mq_attr *attr) |
static void | mqueue_free (struct mqueue *mq) |
static int | mqueue_send (struct mqueue *mq, const char *msg_ptr, size_t msg_len, unsigned msg_prio, int waitok, const struct timespec *abs_timeout) |
static int | mqueue_receive (struct mqueue *mq, char *msg_ptr, size_t msg_len, unsigned *msg_prio, int waitok, const struct timespec *abs_timeout) |
static int | _mqueue_send (struct mqueue *mq, struct mqueue_msg *msg, int timo) |
static int | _mqueue_recv (struct mqueue *mq, struct mqueue_msg **msg, int timo) |
static void | mqueue_send_notification (struct mqueue *mq) |
static void | mqueue_fdclose (struct thread *td, int fd, struct file *fp) |
static void | mq_proc_exit (void *arg, struct proc *p) |
static void | filt_mqdetach (struct knote *kn) |
static int | filt_mqread (struct knote *kn, long hint) |
static int | filt_mqwrite (struct knote *kn, long hint) |
static void | mqfs_fileno_init (struct mqfs_info *mi) |
static void | mqfs_fileno_uninit (struct mqfs_info *mi) |
static __inline struct mqfs_node * | mqnode_alloc (void) |
static __inline void | mqnode_free (struct mqfs_node *node) |
static __inline void | mqnode_addref (struct mqfs_node *node) |
static __inline void | mqnode_release (struct mqfs_node *node) |
static int | mqfs_add_node (struct mqfs_node *parent, struct mqfs_node *node) |
static struct mqfs_node * | mqfs_create_node (const char *name, int namelen, struct ucred *cred, int mode, int nodetype) |
static int | mqfs_fixup_dir (struct mqfs_node *parent) |
static int | mqfs_mount (struct mount *mp) |
static int | mqfs_unmount (struct mount *mp, int mntflags) |
static int | mqfs_root (struct mount *mp, int flags, struct vnode **vpp) |
static int | mqfs_statfs (struct mount *mp, struct statfs *sbp) |
static int | mqfs_init (struct vfsconf *vfc) |
static int | mqfs_uninit (struct vfsconf *vfc) |
static void | do_recycle (void *context, int pending __unused) |
static struct mqfs_node * | mqfs_search (struct mqfs_node *pd, const char *name, int len) |
static int | mqfs_lookupx (struct vop_cachedlookup_args *ap) |
static int | mqfs_lookup (struct vop_cachedlookup_args *ap) |
static int | mqfs_create (struct vop_create_args *ap) |
static int | do_unlink (struct mqfs_node *pn, struct ucred *ucred) |
static int | mqfs_remove (struct vop_remove_args *ap) |
static int | mqfs_inactive (struct vop_inactive_args *ap) |
static int | mqfs_reclaim (struct vop_reclaim_args *ap) |
static int | mqfs_open (struct vop_open_args *ap) |
static int | mqfs_close (struct vop_close_args *ap) |
static int | mqfs_access (struct vop_access_args *ap) |
static int | mqfs_getattr (struct vop_getattr_args *ap) |
static int | mqfs_setattr (struct vop_setattr_args *ap) |
static int | mqfs_read (struct vop_read_args *ap) |
static int | mqfs_readdir (struct vop_readdir_args *ap) |
static struct mqueue_msg * | mqueue_loadmsg (const char *msg_ptr, size_t msg_size, int msg_prio) |
static int | mqueue_savemsg (struct mqueue_msg *msg, char *msg_ptr, int *msg_prio) |
static __inline void | mqueue_freemsg (struct mqueue_msg *msg) |
static __inline struct mqueue_notifier * | notifier_alloc (void) |
static __inline void | notifier_free (struct mqueue_notifier *p) |
static struct mqueue_notifier * | notifier_search (struct proc *p, int fd) |
static __inline void | notifier_insert (struct proc *p, struct mqueue_notifier *nt) |
static __inline void | notifier_delete (struct proc *p, struct mqueue_notifier *nt) |
static void | notifier_remove (struct proc *p, struct mqueue *mq, int fd) |
static int | kern_kmq_open (struct thread *td, const char *upath, int flags, mode_t mode, const struct mq_attr *attr) |
int | sys_kmq_open (struct thread *td, struct kmq_open_args *uap) |
int | sys_kmq_unlink (struct thread *td, struct kmq_unlink_args *uap) |
static int | _getmq (struct thread *td, int fd, cap_rights_t rights, _fgetf func, struct file **fpp, struct mqfs_node **ppn, struct mqueue **pmq) |
static __inline int | getmq (struct thread *td, int fd, struct file **fpp, struct mqfs_node **ppn, struct mqueue **pmq) |
static __inline int | getmq_read (struct thread *td, int fd, struct file **fpp, struct mqfs_node **ppn, struct mqueue **pmq) |
static __inline int | getmq_write (struct thread *td, int fd, struct file **fpp, struct mqfs_node **ppn, struct mqueue **pmq) |
static int | kern_kmq_setattr (struct thread *td, int mqd, const struct mq_attr *attr, struct mq_attr *oattr) |
int | sys_kmq_setattr (struct thread *td, struct kmq_setattr_args *uap) |
int | sys_kmq_timedreceive (struct thread *td, struct kmq_timedreceive_args *uap) |
int | sys_kmq_timedsend (struct thread *td, struct kmq_timedsend_args *uap) |
static int | kern_kmq_notify (struct thread *td, int mqd, struct sigevent *sigev) |
int | sys_kmq_notify (struct thread *td, struct kmq_notify_args *uap) |
static void | mq_proc_exit (void *arg __unused, struct proc *p) |
static int | mqf_read (struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, struct thread *td) |
static int | mqf_write (struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, struct thread *td) |
static int | mqf_truncate (struct file *fp, off_t length, struct ucred *active_cred, struct thread *td) |
static int | mqf_ioctl (struct file *fp, u_long cmd, void *data, struct ucred *active_cred, struct thread *td) |
static int | mqf_poll (struct file *fp, int events, struct ucred *active_cred, struct thread *td) |
static int | mqf_close (struct file *fp, struct thread *td) |
static int | mqf_stat (struct file *fp, struct stat *st, struct ucred *active_cred, struct thread *td) |
static int | mqf_chmod (struct file *fp, mode_t mode, struct ucred *active_cred, struct thread *td) |
static int | mqf_chown (struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred, struct thread *td) |
static int | mqf_kqfilter (struct file *fp, struct knote *kn) |
static int | mqinit (void) |
static int | mqunload (void) |
static int | mq_modload (struct module *module, int cmd, void *arg) |
DECLARE_MODULE (mqueuefs, mqueuefs_mod, SI_SUB_VFS, SI_ORDER_MIDDLE) | |
MODULE_VERSION (mqueuefs, 1) | |
Variables | |
static int | default_maxmsg = 10 |
static int | default_msgsize = 1024 |
static int | maxmsg = 100 |
static int | maxmsgsize = 16384 |
static int | maxmq = 100 |
static int | curmq = 0 |
static int | unloadable = 0 |
static eventhandler_tag | exit_tag |
static struct mqfs_info | mqfs_data |
static uma_zone_t | mqnode_zone |
static uma_zone_t | mqueue_zone |
static uma_zone_t | mvdata_zone |
static uma_zone_t | mqnoti_zone |
static struct vop_vector | mqfs_vnodeops |
static struct fileops | mqueueops |
struct filterops | mq_rfiltops |
struct filterops | mq_wfiltops |
static struct vfsops | mqfs_vfsops |
static struct vfsconf | mqueuefs_vfsconf |
static struct syscall_helper_data | mq_syscalls [] |
static moduledata_t | mqueuefs_mod |
#define FPTOMQ | ( | fp | ) |
Definition at line 150 of file uipc_mqueue.c.
Referenced by filt_mqdetach(), filt_mqread(), filt_mqwrite(), mq_proc_exit(), mqf_kqfilter(), mqf_poll(), and mqueue_fdclose().
#define MQ_RSEL 0x01 |
Definition at line 179 of file uipc_mqueue.c.
Referenced by _mqueue_send(), mqf_poll(), and mqueue_fdclose().
#define MQ_WSEL 0x02 |
Definition at line 180 of file uipc_mqueue.c.
Referenced by _mqueue_recv(), mqf_poll(), and mqueue_fdclose().
#define MQFS_DELEN (8 + MQFS_NAMELEN) |
Definition at line 92 of file uipc_mqueue.c.
#define MQFS_NAMELEN NAME_MAX |
Definition at line 91 of file uipc_mqueue.c.
Referenced by kern_kmq_open(), mqfs_lookupx(), mqfs_readdir(), and sys_kmq_unlink().
#define VFSTOMQFS | ( | m | ) | ((struct mqfs_info *)((m)->mnt_data)) |
Definition at line 149 of file uipc_mqueue.c.
Referenced by mqfs_create(), mqfs_readdir(), mqfs_reclaim(), mqfs_remove(), and mqfs_root().
Definition at line 148 of file uipc_mqueue.c.
Referenced by mqfs_read().
#define VTON | ( | vp | ) | (((struct mqfs_vdata *)((vp)->v_data))->mv_node) |
Definition at line 147 of file uipc_mqueue.c.
Referenced by mqfs_create(), mqfs_getattr(), mqfs_inactive(), mqfs_lookupx(), mqfs_read(), mqfs_readdir(), mqfs_remove(), and mqfs_setattr().
typedef int(* _fgetf) (struct thread *, int, cap_rights_t, struct file **) |
Definition at line 2089 of file uipc_mqueue.c.
enum mqfs_type_t |
Enumerator | |
---|---|
mqfstype_none | |
mqfstype_root | |
mqfstype_dir | |
mqfstype_this | |
mqfstype_parent | |
mqfstype_file | |
mqfstype_symlink |
Definition at line 95 of file uipc_mqueue.c.
__FBSDID | ( | "$BSDSUniX$" | ) |
|
static |
Definition at line 2095 of file uipc_mqueue.c.
References mqueueops.
Referenced by getmq(), getmq_read(), and getmq_write().
|
static |
Definition at line 1854 of file uipc_mqueue.c.
References mqueue::mq_curmsgs, mqueue::mq_flags, mqueue::mq_msgq, mqueue::mq_mutex, mqueue::mq_notifier, mqueue::mq_receivers, mqueue::mq_senders, mqueue::mq_totalbytes, mqueue::mq_wsel, MQ_WSEL, mqueue_send_notification(), selwakeup(), and wakeup_one().
Referenced by mqueue_receive().
|
static |
Definition at line 1696 of file uipc_mqueue.c.
References mqueue::mq_curmsgs, mqueue::mq_flags, mqueue::mq_maxmsg, mqueue::mq_msgq, mqueue::mq_mutex, mqueue::mq_notifier, mqueue::mq_receivers, mqueue::mq_rsel, MQ_RSEL, mqueue::mq_senders, mqueue::mq_totalbytes, mqueue_send_notification(), selwakeup(), and wakeup_one().
Referenced by mqueue_send().
DECLARE_MODULE | ( | mqueuefs | , |
mqueuefs_mod | , | ||
SI_SUB_VFS | , | ||
SI_ORDER_MIDDLE | |||
) |
|
static |
Definition at line 702 of file uipc_mqueue.c.
References vdrop(), and vrecycle().
Referenced by mqfs_allocv().
|
static |
Definition at line 1000 of file uipc_mqueue.c.
References cache_purge(), mqfs_info::mi_lock, mqfs_node::mn_info, mqfs_node::mn_parent, mqnode_release(), parent, priv_check_cred(), taskqueue_enqueue(), and vhold().
Referenced by mqfs_remove(), and sys_kmq_unlink().
FEATURE | ( | p1003_1b_mqueue | , |
"POSIX P1003.1B message queues support" | |||
) |
|
static |
Definition at line 2558 of file uipc_mqueue.c.
References FPTOMQ, knlist_remove(), mqueue::mq_rsel, mqueue::mq_wsel, and panic().
|
static |
Definition at line 2571 of file uipc_mqueue.c.
References FPTOMQ, mqueue::mq_curmsgs, and mqueue::mq_mutex.
|
static |
Definition at line 2580 of file uipc_mqueue.c.
References FPTOMQ, mqueue::mq_curmsgs, mqueue::mq_maxmsg, and mqueue::mq_mutex.
|
static |
Definition at line 2117 of file uipc_mqueue.c.
References _getmq(), and fget().
Referenced by kern_kmq_notify(), and kern_kmq_setattr().
|
static |
Definition at line 2124 of file uipc_mqueue.c.
References _getmq(), and fget_read().
Referenced by sys_kmq_timedreceive().
|
static |
Definition at line 2131 of file uipc_mqueue.c.
References _getmq(), and fget_write().
Referenced by sys_kmq_timedsend().
|
static |
Definition at line 2239 of file uipc_mqueue.c.
References cap_funwrap(), getmq(), mqueue::mq_msgq, mqueue::mq_mutex, mqueue::mq_notifier, mqueue::mq_receivers, mqueue_send_notification(), notifier_alloc(), notifier_free(), notifier_insert(), notifier_remove(), notifier_search(), and sigqueue_take().
Referenced by sys_kmq_notify().
|
static |
Definition at line 1947 of file uipc_mqueue.c.
References accmode, falloc(), fd, fdclose(), finit(), mqfs_info::mi_lock, mqfs_info::mi_root, mqfs_create_file(), mqfs_data, MQFS_NAMELEN, mqfs_search(), mqnode_addref(), mqueue_alloc(), mqueue_free(), mqueueops, path, and vaccess().
Referenced by sys_kmq_open().
|
static |
Definition at line 2138 of file uipc_mqueue.c.
References flag, getmq(), mqueue::mq_curmsgs, mqueue::mq_maxmsg, and mqueue::mq_msgsize.
Referenced by sys_kmq_setattr().
|
static |
MODULE_VERSION | ( | mqueuefs | , |
1 | |||
) |
|
static |
Definition at line 2838 of file uipc_mqueue.c.
References mqinit(), mqunload(), and vfs_modevent().
|
static |
|
static |
Definition at line 2383 of file uipc_mqueue.c.
References FPTOMQ, mqueue::mq_mutex, mqueueops, and notifier_remove().
|
static |
Definition at line 2496 of file uipc_mqueue.c.
References mqfs_info::mi_lock, mqfs_data, and vaccess().
|
static |
Definition at line 2516 of file uipc_mqueue.c.
References groupmember(), mqfs_info::mi_lock, mqfs_data, and priv_check_cred().
|
static |
Definition at line 2463 of file uipc_mqueue.c.
References badfileops, mqfs_info::mi_lock, mqfs_data, and mqnode_release().
|
static |
Definition at line 2428 of file uipc_mqueue.c.
|
static |
Definition at line 2541 of file uipc_mqueue.c.
References FPTOMQ, knlist_add(), mq_rfiltops, mqueue::mq_rsel, mq_wfiltops, and mqueue::mq_wsel.
|
static |
Definition at line 2435 of file uipc_mqueue.c.
References FPTOMQ, mqueue::mq_curmsgs, mqueue::mq_flags, mqueue::mq_maxmsg, mqueue::mq_mutex, mqueue::mq_rsel, MQ_RSEL, mqueue::mq_wsel, MQ_WSEL, and selrecord().
|
static |
Definition at line 2406 of file uipc_mqueue.c.
|
static |
Definition at line 2477 of file uipc_mqueue.c.
References mqfs_info::mi_lock, and mqfs_data.
|
static |
Definition at line 2420 of file uipc_mqueue.c.
|
static |
Definition at line 2413 of file uipc_mqueue.c.
|
static |
Definition at line 1146 of file uipc_mqueue.c.
References vaccess().
Definition at line 411 of file uipc_mqueue.c.
References mqfs_node::mn_info, mqfs_node::mn_parent, mqfstype_dir, mqfstype_root, mqnode_addref(), and parent.
Referenced by mqfs_create_file(), and mqfs_fixup_dir().
|
static |
Definition at line 714 of file uipc_mqueue.c.
References do_recycle(), getnewvnode(), insmntque(), mqfs_info::mi_lock, mqfs_node::mn_info, mqfs_node::mn_name, mqfs_vnodeops, mqfstype_dir, mqfstype_file, mqfstype_none, mqfstype_parent, mqfstype_root, mqfstype_symlink, mqfstype_this, mqnode_addref(), panic(), vdrop(), vget(), vgone(), vhold(), and vput().
Referenced by mqfs_create(), mqfs_lookupx(), and mqfs_root().
|
static |
Definition at line 1127 of file uipc_mqueue.c.
|
static |
Definition at line 958 of file uipc_mqueue.c.
References mqfs_info::mi_lock, mqfs_allocv(), mqfs_create_file(), mqfs_destroy(), mqfstype_dir, mqfstype_root, mqnode_addref(), mqnode_release(), mqueue_alloc(), mqueue_free(), panic(), VFSTOMQFS, and VTON.
|
static |
Definition at line 452 of file uipc_mqueue.c.
References mqfs_add_node(), mqfs_create_node(), mqfstype_file, and mqnode_free().
Referenced by kern_kmq_open(), and mqfs_create().
|
static |
Definition at line 430 of file uipc_mqueue.c.
References mqfs_node::mn_name, mode, mqnode_alloc(), and vfs_timestamp().
Referenced by mqfs_create_file(), and mqfs_init().
|
static |
Definition at line 542 of file uipc_mqueue.c.
References mqfs_node::mn_info, mqfs_node::mn_parent, mqfs_fileno_free(), mqfstype_dir, mqfstype_root, mqnode_free(), mqueue_free(), and parent.
Referenced by mqfs_create(), mqfs_uninit(), and mqnode_release().
Definition at line 304 of file uipc_mqueue.c.
References alloc_unr(), mqfs_info::mi_root, mqfs_info::mi_unrhdr, mqfs_node::mn_parent, mqfstype_dir, mqfstype_file, mqfstype_parent, mqfstype_root, mqfstype_symlink, and mqfstype_this.
Referenced by mqfs_init(), and mqfs_readdir().
Definition at line 345 of file uipc_mqueue.c.
References free_unr(), mqfs_info::mi_unrhdr, mqfstype_dir, mqfstype_file, mqfstype_parent, mqfstype_root, mqfstype_symlink, and mqfstype_this.
Referenced by mqfs_destroy().
|
static |
Definition at line 279 of file uipc_mqueue.c.
References mqfs_info::mi_unrhdr, and new_unrhdr().
Referenced by mqfs_init().
|
static |
Definition at line 291 of file uipc_mqueue.c.
References delete_unrhdr(), and mqfs_info::mi_unrhdr.
Referenced by mqfs_uninit().
|
static |
Definition at line 469 of file uipc_mqueue.c.
References mqfs_node::mn_name, mqfs_add_node(), mqfstype_parent, mqfstype_this, mqnode_alloc(), and mqnode_free().
Referenced by mqfs_init().
|
static |
Definition at line 1173 of file uipc_mqueue.c.
References VTON.
|
static |
Definition at line 1063 of file uipc_mqueue.c.
References vrecycle(), and VTON.
|
static |
Definition at line 642 of file uipc_mqueue.c.
References mqfs_info::mi_lock, mqfs_info::mi_root, mqfs_node::mn_info, mq_fdclose, mq_proc_exit(), mqfs_create_node(), mqfs_data, mqfs_fileno_alloc(), mqfs_fileno_init(), mqfs_fixup_dir(), mqfstype_root, mqueue_fdclose(), and p31b_setcfg().
|
static |
Definition at line 937 of file uipc_mqueue.c.
References mqfs_lookupx().
|
static |
Definition at line 819 of file uipc_mqueue.c.
References cache_enter(), mqfs_info::mi_lock, mqfs_node::mn_info, mqfs_node::mn_parent, mqfs_allocv(), MQFS_NAMELEN, mqfs_search(), mqnode_addref(), mqnode_release(), and VTON.
Referenced by mqfs_lookup().
|
static |
Definition at line 575 of file uipc_mqueue.c.
References mqfs_data, vfs_getnewfsid(), and vfs_mountedfrom().
|
static |
Definition at line 1111 of file uipc_mqueue.c.
|
static |
Definition at line 1315 of file uipc_mqueue.c.
References buf, mqueue::mq_curmsgs, mqueue::mq_maxmsg, mqueue::mq_msgsize, mqueue::mq_totalbytes, snprintf(), uiomove_frombuf(), VTOMQ, and VTON.
|
static |
Definition at line 1357 of file uipc_mqueue.c.
References mqfs_info::mi_lock, mqfs_node::mn_name, mqfs_fileno_alloc(), MQFS_NAMELEN, mqfstype_dir, mqfstype_file, mqfstype_parent, mqfstype_root, mqfstype_symlink, mqfstype_this, panic(), vfs_read_dirent(), VFSTOMQFS, and VTON.
|
static |
Definition at line 1081 of file uipc_mqueue.c.
References mqfs_info::mi_lock, mqnode_release(), and VFSTOMQFS.
|
static |
Definition at line 1040 of file uipc_mqueue.c.
References do_unlink(), mqfs_info::mi_lock, VFSTOMQFS, and VTON.
|
static |
Definition at line 618 of file uipc_mqueue.c.
References mqfs_info::mi_root, mqfs_allocv(), and VFSTOMQFS.
Definition at line 802 of file uipc_mqueue.c.
References mqfs_info::mi_lock, mqfs_node::mn_info, and mqfs_node::mn_name.
Referenced by kern_kmq_open(), mqfs_lookupx(), and sys_kmq_unlink().
|
static |
Definition at line 1214 of file uipc_mqueue.c.
References groupmember(), priv_check(), vfs_timestamp(), and VTON.
|
static |
Definition at line 632 of file uipc_mqueue.c.
|
static |
Definition at line 679 of file uipc_mqueue.c.
References mqfs_info::mi_lock, mqfs_info::mi_root, mqfs_data, mqfs_destroy(), mqfs_fileno_uninit(), and sx_destroy().
|
static |
Definition at line 605 of file uipc_mqueue.c.
References vflush().
|
static |
Definition at line 2811 of file uipc_mqueue.c.
References syscall_helper_register().
Referenced by mq_modload().
|
static |
Definition at line 379 of file uipc_mqueue.c.
Referenced by kern_kmq_open(), mqfs_add_node(), mqfs_allocv(), mqfs_create(), and mqfs_lookupx().
|
static |
Definition at line 367 of file uipc_mqueue.c.
Referenced by mqfs_create_node(), and mqfs_fixup_dir().
|
static |
Definition at line 373 of file uipc_mqueue.c.
Referenced by mqfs_create_file(), mqfs_destroy(), and mqfs_fixup_dir().
|
static |
Definition at line 385 of file uipc_mqueue.c.
References mqfs_info::mi_lock, mqfs_node::mn_info, mqfs_destroy(), mqfstype_dir, and mqfstype_root.
Referenced by do_unlink(), mqf_close(), mqfs_create(), mqfs_lookupx(), and mqfs_reclaim().
|
static |
Definition at line 1529 of file uipc_mqueue.c.
References default_maxmsg, default_msgsize, knlist_init_mtx(), mqueue::mq_maxmsg, mqueue::mq_msgq, mqueue::mq_msgsize, mqueue::mq_mutex, mqueue::mq_rsel, mqueue::mq_wsel, and mtx_init().
Referenced by kern_kmq_open(), and mqfs_create().
|
static |
Definition at line 2356 of file uipc_mqueue.c.
References FPTOMQ, mqueue::mq_flags, mqueue::mq_mutex, mqueue::mq_rsel, MQ_RSEL, mqueue::mq_wsel, MQ_WSEL, mqueueops, notifier_remove(), and selwakeup().
Referenced by mqfs_init().
|
static |
Definition at line 1555 of file uipc_mqueue.c.
References free(), knlist_destroy(), mqueue::mq_msgq, mqueue::mq_mutex, mqueue::mq_rsel, mqueue::mq_wsel, mtx_destroy(), and seldrain().
Referenced by kern_kmq_open(), mqfs_create(), and mqfs_destroy().
|
static |
Definition at line 1616 of file uipc_mqueue.c.
References free().
Referenced by mqueue_receive(), and mqueue_send().
|
static |
Definition at line 1577 of file uipc_mqueue.c.
References free(), and malloc().
Referenced by mqueue_send().
|
static |
Definition at line 1783 of file uipc_mqueue.c.
References _mqueue_recv(), getnanotime(), mqueue_freemsg(), mqueue_savemsg(), and tvtohz().
Referenced by sys_kmq_timedreceive().
|
static |
Definition at line 1601 of file uipc_mqueue.c.
Referenced by mqueue_receive().
|
static |
Definition at line 1627 of file uipc_mqueue.c.
References _mqueue_send(), getnanotime(), mqueue::mq_msgsize, mqueue_freemsg(), mqueue_loadmsg(), and tvtohz().
Referenced by sys_kmq_timedsend().
|
static |
Definition at line 1752 of file uipc_mqueue.c.
References mqueue::mq_mutex, mqueue::mq_notifier, sigev_findtd(), and tdsendsignal().
Referenced by _mqueue_recv(), _mqueue_send(), and kern_kmq_notify().
|
static |
Definition at line 2827 of file uipc_mqueue.c.
References syscall_helper_unregister().
Referenced by mq_modload().
|
static |
Definition at line 1893 of file uipc_mqueue.c.
Referenced by kern_kmq_notify().
|
static |
Definition at line 1923 of file uipc_mqueue.c.
References notifier_free().
Referenced by notifier_remove().
|
static |
Definition at line 1899 of file uipc_mqueue.c.
Referenced by kern_kmq_notify(), and notifier_delete().
|
static |
Definition at line 1917 of file uipc_mqueue.c.
Referenced by kern_kmq_notify().
|
static |
Definition at line 1930 of file uipc_mqueue.c.
References mqueue::mq_mutex, mqueue::mq_notifier, notifier_delete(), notifier_search(), and sigqueue_take().
Referenced by kern_kmq_notify(), mq_proc_exit(), and mqueue_fdclose().
|
static |
Definition at line 1905 of file uipc_mqueue.c.
Referenced by kern_kmq_notify(), and notifier_remove().
int sys_kmq_notify | ( | struct thread * | td, |
struct kmq_notify_args * | uap | ||
) |
Definition at line 2339 of file uipc_mqueue.c.
References kern_kmq_notify().
int sys_kmq_open | ( | struct thread * | td, |
struct kmq_open_args * | uap | ||
) |
Definition at line 2044 of file uipc_mqueue.c.
References kern_kmq_open().
int sys_kmq_setattr | ( | struct thread * | td, |
struct kmq_setattr_args * | uap | ||
) |
Definition at line 2168 of file uipc_mqueue.c.
References kern_kmq_setattr().
int sys_kmq_timedreceive | ( | struct thread * | td, |
struct kmq_timedreceive_args * | uap | ||
) |
Definition at line 2188 of file uipc_mqueue.c.
References getmq_read(), and mqueue_receive().
int sys_kmq_timedsend | ( | struct thread * | td, |
struct kmq_timedsend_args * | uap | ||
) |
Definition at line 2214 of file uipc_mqueue.c.
References getmq_write(), and mqueue_send().
int sys_kmq_unlink | ( | struct thread * | td, |
struct kmq_unlink_args * | uap | ||
) |
Definition at line 2065 of file uipc_mqueue.c.
References do_unlink(), mqfs_info::mi_lock, mqfs_info::mi_root, mqfs_data, MQFS_NAMELEN, mqfs_search(), and path.
SYSCTL_INT | ( | _kern_mqueue | , |
OID_AUTO | , | ||
maxmsg | , | ||
CTLFLAG_RW | , | ||
& | maxmsg, | ||
0 | , | ||
"Default maximum messages in queue" | |||
) |
SYSCTL_INT | ( | _kern_mqueue | , |
OID_AUTO | , | ||
maxmsgsize | , | ||
CTLFLAG_RW | , | ||
& | maxmsgsize, | ||
0 | , | ||
"Default maximum message size" | |||
) |
SYSCTL_INT | ( | _kern_mqueue | , |
OID_AUTO | , | ||
maxmq | , | ||
CTLFLAG_RW | , | ||
& | maxmq, | ||
0 | , | ||
"maximum message queues" | |||
) |
SYSCTL_INT | ( | _kern_mqueue | , |
OID_AUTO | , | ||
curmq | , | ||
CTLFLAG_RW | , | ||
& | curmq, | ||
0 | , | ||
"current message queue number" | |||
) |
|
static |
TAILQ_HEAD | ( | msgq | , |
mqueue_msg | |||
) |
|
static |
Definition at line 204 of file uipc_mqueue.c.
|
static |
Definition at line 192 of file uipc_mqueue.c.
Referenced by mqueue_alloc().
|
static |
Definition at line 193 of file uipc_mqueue.c.
Referenced by mqueue_alloc().
|
static |
Definition at line 210 of file uipc_mqueue.c.
|
static |
Definition at line 201 of file uipc_mqueue.c.
|
static |
Definition at line 195 of file uipc_mqueue.c.
|
static |
Definition at line 198 of file uipc_mqueue.c.
struct filterops mq_rfiltops |
Definition at line 264 of file uipc_mqueue.c.
Referenced by mqf_kqfilter().
|
static |
Definition at line 2638 of file uipc_mqueue.c.
struct filterops mq_wfiltops |
Definition at line 269 of file uipc_mqueue.c.
Referenced by mqf_kqfilter().
|
static |
Definition at line 213 of file uipc_mqueue.c.
Referenced by kern_kmq_open(), mqf_chmod(), mqf_chown(), mqf_close(), mqf_stat(), mqfs_init(), mqfs_mount(), mqfs_uninit(), and sys_kmq_unlink().
|
static |
Definition at line 2621 of file uipc_mqueue.c.
|
static |
Definition at line 218 of file uipc_mqueue.c.
Referenced by mqfs_allocv().
|
static |
Definition at line 214 of file uipc_mqueue.c.
|
static |
Definition at line 217 of file uipc_mqueue.c.
|
static |
Definition at line 215 of file uipc_mqueue.c.
|
static |
Definition at line 2861 of file uipc_mqueue.c.
|
static |
Definition at line 2630 of file uipc_mqueue.c.
|
static |
Definition at line 219 of file uipc_mqueue.c.
Referenced by _getmq(), kern_kmq_open(), mq_proc_exit(), and mqueue_fdclose().
|
static |
Definition at line 216 of file uipc_mqueue.c.
|
static |
Definition at line 207 of file uipc_mqueue.c.
Referenced by accept_filt_generic_mod_event().