FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include "opt_capsicum.h"
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/limits.h>
#include <sys/malloc.h>
#include <sys/buf.h>
#include <sys/capsicum.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/jail.h>
#include <sys/lock.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/user.h>
#include <sys/vnode.h>
#include <machine/atomic.h>
#include <security/audit/audit.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 ("$FreeBSD$") | |
FEATURE (p1003_1b_mqueue, "POSIX P1003.1B message queues support") | |
TAILQ_HEAD (msgq, mqueue_msg) | |
static | SYSCTL_NODE (_kern, OID_AUTO, mqueue, CTLFLAG_RW|CTLFLAG_MPSAFE, 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 int | mqfs_prison_remove (void *obj, void *data) |
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, struct ucred *cred) |
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 int | mqfs_prison_remove (void *obj, void *data __unused) |
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 *rightsp, _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_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) |
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 | mqf_fill_kinfo (struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) |
VFS_VOP_VECTOR_REGISTER (mqfs_vnodeops) | |
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 |
static unsigned | mqfs_osd_jail_slot |
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 163 of file uipc_mqueue.c.
#define MQ_RSEL 0x01 |
Definition at line 192 of file uipc_mqueue.c.
#define MQ_WSEL 0x02 |
Definition at line 193 of file uipc_mqueue.c.
#define MQFS_DELEN (8 + MQFS_NAMELEN) |
Definition at line 104 of file uipc_mqueue.c.
#define MQFS_NAMELEN NAME_MAX |
Definition at line 103 of file uipc_mqueue.c.
#define VFSTOMQFS | ( | m | ) | ((struct mqfs_info *)((m)->mnt_data)) |
Definition at line 162 of file uipc_mqueue.c.
Definition at line 161 of file uipc_mqueue.c.
#define VTON | ( | vp | ) | (((struct mqfs_vdata *)((vp)->v_data))->mv_node) |
Definition at line 160 of file uipc_mqueue.c.
typedef int(* _fgetf) (struct thread *, int, cap_rights_t *, struct file **) |
Definition at line 2165 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 107 of file uipc_mqueue.c.
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 2171 of file uipc_mqueue.c.
Referenced by getmq(), getmq_read(), and getmq_write().
|
static |
Definition at line 1917 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 1760 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 722 of file uipc_mqueue.c.
References vdrop(), and vrecycle().
Referenced by mqfs_allocv().
|
static |
Definition at line 1026 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_prison_remove(), mqfs_remove(), and sys_kmq_unlink().
FEATURE | ( | p1003_1b_mqueue | , |
"POSIX P1003.1B message queues support" | |||
) |
|
static |
Definition at line 2620 of file uipc_mqueue.c.
References FPTOMQ, knlist_remove(), mqueue::mq_rsel, mqueue::mq_wsel, and panic().
|
static |
Definition at line 2633 of file uipc_mqueue.c.
References FPTOMQ, mqueue::mq_curmsgs, and mqueue::mq_mutex.
|
static |
Definition at line 2642 of file uipc_mqueue.c.
References FPTOMQ, mqueue::mq_curmsgs, mqueue::mq_maxmsg, and mqueue::mq_mutex.
|
static |
Definition at line 2193 of file uipc_mqueue.c.
References _getmq(), cap_event_rights, fd, and fget().
Referenced by kern_kmq_notify(), and kern_kmq_setattr().
|
static |
Definition at line 2202 of file uipc_mqueue.c.
References _getmq(), cap_read_rights, fd, and fget_read().
Referenced by sys_kmq_timedreceive().
|
static |
Definition at line 2211 of file uipc_mqueue.c.
References _getmq(), cap_write_rights, fd, and fget_write().
Referenced by sys_kmq_timedsend().
|
static |
Definition at line 2326 of file uipc_mqueue.c.
References cap_event_rights, 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 2010 of file uipc_mqueue.c.
References accmode, fd, fdclose(), finit(), flags, maxmsg, maxmsgsize, mqfs_info::mi_lock, mqfs_info::mi_root, mode, 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 2220 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 2915 of file uipc_mqueue.c.
References mqinit(), mqunload(), and vfs_modevent().
|
static |
Definition at line 2475 of file uipc_mqueue.c.
References FPTOMQ, mqueue::mq_mutex, mqueueops, and notifier_remove().
|
static |
|
static |
Definition at line 2558 of file uipc_mqueue.c.
References mqfs_info::mi_lock, mode, mqfs_data, and vaccess().
|
static |
Definition at line 2578 of file uipc_mqueue.c.
References groupmember(), mqfs_info::mi_lock, mqfs_data, and priv_check_cred().
|
static |
Definition at line 2526 of file uipc_mqueue.c.
References badfileops, mqfs_info::mi_lock, mqfs_data, and mqnode_release().
|
static |
Definition at line 2651 of file uipc_mqueue.c.
|
static |
Definition at line 2603 of file uipc_mqueue.c.
References FPTOMQ, knlist_add(), mq_rfiltops, mqueue::mq_rsel, mq_wfiltops, and mqueue::mq_wsel.
|
static |
Definition at line 2498 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 2540 of file uipc_mqueue.c.
References mqfs_info::mi_lock, mqfs_data, and st.
|
static |
Definition at line 1171 of file uipc_mqueue.c.
References vaccess().
Definition at line 426 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 736 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(), mvdata_zone, panic(), vdrop(), vget(), vgone(), vhold(), and vput().
Referenced by mqfs_create(), mqfs_lookupx(), and mqfs_root().
|
static |
Definition at line 1152 of file uipc_mqueue.c.
|
static |
Definition at line 984 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 468 of file uipc_mqueue.c.
References mode, mqfs_add_node(), mqfs_create_node(), mqfstype_file, mqnode_free(), name, and parent.
Referenced by kern_kmq_open(), and mqfs_create().
|
static |
Definition at line 445 of file uipc_mqueue.c.
References mqfs_node::mn_name, mode, mqnode_alloc(), name, and vfs_timestamp().
Referenced by mqfs_create_file(), and mqfs_init().
|
static |
Definition at line 558 of file uipc_mqueue.c.
References mqfs_node::mn_info, mqfs_node::mn_parent, mqfs_destroy(), mqfs_fileno_free(), mqfstype_dir, mqfstype_root, mqnode_free(), mqueue_free(), and parent.
Referenced by mqfs_create(), mqfs_destroy(), mqfs_uninit(), and mqnode_release().
Definition at line 319 of file uipc_mqueue.c.
References alloc_unr(), mqfs_info::mi_root, mqfs_info::mi_unrhdr, mqfs_node::mn_parent, mqfs_fileno_alloc(), mqfstype_dir, mqfstype_file, mqfstype_parent, mqfstype_root, mqfstype_symlink, and mqfstype_this.
Referenced by mqfs_fileno_alloc(), mqfs_init(), and mqfs_readdir().
Definition at line 360 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 294 of file uipc_mqueue.c.
References mqfs_info::mi_unrhdr, and new_unrhdr().
Referenced by mqfs_init().
|
static |
Definition at line 306 of file uipc_mqueue.c.
References delete_unrhdr(), and mqfs_info::mi_unrhdr.
Referenced by mqfs_uninit().
|
static |
Definition at line 485 of file uipc_mqueue.c.
References mqfs_node::mn_name, mqfs_add_node(), mqfstype_parent, mqfstype_this, mqnode_alloc(), mqnode_free(), and parent.
Referenced by mqfs_init().
|
static |
Definition at line 1198 of file uipc_mqueue.c.
References VTON.
|
static |
Definition at line 1089 of file uipc_mqueue.c.
References vrecycle(), and VTON.
|
static |
Definition at line 657 of file uipc_mqueue.c.
References exit_tag, 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(), mqfs_osd_jail_slot, mqfs_prison_remove(), mqfstype_root, mqnode_zone, mqnoti_zone, mqueue_fdclose(), mqueue_zone, mvdata_zone, and p31b_setcfg().
|
static |
Definition at line 963 of file uipc_mqueue.c.
References mqfs_lookupx().
|
static |
Definition at line 845 of file uipc_mqueue.c.
References flags, 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 591 of file uipc_mqueue.c.
References mqfs_data, vfs_getnewfsid(), and vfs_mountedfrom().
|
static |
Definition at line 1136 of file uipc_mqueue.c.
|
static |
Definition at line 1562 of file uipc_mqueue.c.
References allprison, do_unlink(), mqfs_info::mi_lock, mqfs_info::mi_root, mqfs_data, and pr.
|
static |
|
static |
Definition at line 1340 of file uipc_mqueue.c.
References buf, mqueue::mq_curmsgs, mqueue::mq_maxmsg, mqueue::mq_msgsize, mqueue::mq_totalbytes, snprintf(), uiomove_frombuf(), and VTOMQ.
|
static |
Definition at line 1380 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 1106 of file uipc_mqueue.c.
References mqfs_info::mi_lock, mqnode_release(), mvdata_zone, and VFSTOMQFS.
|
static |
Definition at line 1066 of file uipc_mqueue.c.
References do_unlink(), mqfs_info::mi_lock, VFSTOMQFS, and VTON.
|
static |
Definition at line 633 of file uipc_mqueue.c.
References mqfs_info::mi_root, mqfs_allocv(), and VFSTOMQFS.
|
static |
Definition at line 824 of file uipc_mqueue.c.
References mqfs_info::mi_lock, mqfs_node::mn_info, mqfs_node::mn_name, and name.
Referenced by kern_kmq_open(), mqfs_lookupx(), and sys_kmq_unlink().
|
static |
Definition at line 1239 of file uipc_mqueue.c.
References groupmember(), priv_check(), vfs_timestamp(), and VTON.
|
static |
Definition at line 647 of file uipc_mqueue.c.
|
static |
Definition at line 698 of file uipc_mqueue.c.
References exit_tag, mqfs_info::mi_lock, mqfs_info::mi_root, mqfs_data, mqfs_destroy(), mqfs_fileno_uninit(), mqfs_osd_jail_slot, mqnode_zone, mqnoti_zone, mqueue_zone, mvdata_zone, sx_destroy(), and unloadable.
|
static |
Definition at line 620 of file uipc_mqueue.c.
References vflush().
|
static |
Definition at line 2888 of file uipc_mqueue.c.
References mq_syscalls, and syscall_helper_register().
Referenced by mq_modload().
|
static |
Definition at line 394 of file uipc_mqueue.c.
Referenced by kern_kmq_open(), mqfs_add_node(), mqfs_allocv(), mqfs_create(), and mqfs_lookupx().
|
static |
Definition at line 382 of file uipc_mqueue.c.
References mqnode_zone.
Referenced by mqfs_create_node(), and mqfs_fixup_dir().
|
static |
Definition at line 388 of file uipc_mqueue.c.
References mqnode_zone.
Referenced by mqfs_create_file(), mqfs_destroy(), and mqfs_fixup_dir().
|
static |
Definition at line 400 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 1594 of file uipc_mqueue.c.
References curmq, default_maxmsg, default_msgsize, knlist_init_mtx(), maxmq, mqueue::mq_maxmsg, mqueue::mq_msgq, mqueue::mq_msgsize, mqueue::mq_mutex, mqueue::mq_rsel, mqueue::mq_wsel, and mqueue_zone.
Referenced by kern_kmq_open(), and mqfs_create().
|
static |
Definition at line 2446 of file uipc_mqueue.c.
References fd, 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 1620 of file uipc_mqueue.c.
References curmq, free(), knlist_destroy(), mqueue::mq_msgq, mqueue::mq_mutex, mqueue::mq_rsel, mqueue::mq_wsel, mqueue_zone, and seldrain().
Referenced by kern_kmq_open(), mqfs_create(), and mqfs_destroy().
|
static |
Definition at line 1681 of file uipc_mqueue.c.
References free().
Referenced by mqueue_receive(), and mqueue_send().
|
static |
Definition at line 1642 of file uipc_mqueue.c.
References free(), and malloc().
Referenced by mqueue_send().
|
static |
Definition at line 1847 of file uipc_mqueue.c.
References _mqueue_recv(), getnanotime(), mqueue_freemsg(), mqueue_savemsg(), ts, and tvtohz().
Referenced by sys_kmq_timedreceive().
|
static |
Definition at line 1666 of file uipc_mqueue.c.
Referenced by mqueue_receive().
|
static |
Definition at line 1692 of file uipc_mqueue.c.
References _mqueue_send(), getnanotime(), mqueue::mq_msgsize, mqueue_freemsg(), mqueue_loadmsg(), ts, and tvtohz().
Referenced by sys_kmq_timedsend().
|
static |
Definition at line 1816 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 2904 of file uipc_mqueue.c.
References mq_syscalls, and syscall_helper_unregister().
Referenced by mq_modload().
|
static |
Definition at line 1956 of file uipc_mqueue.c.
References mqnoti_zone.
Referenced by kern_kmq_notify().
|
static |
Definition at line 1986 of file uipc_mqueue.c.
References notifier_free().
Referenced by notifier_remove().
|
static |
Definition at line 1962 of file uipc_mqueue.c.
References mqnoti_zone.
Referenced by kern_kmq_notify(), and notifier_delete().
|
static |
Definition at line 1980 of file uipc_mqueue.c.
Referenced by kern_kmq_notify().
|
static |
Definition at line 1993 of file uipc_mqueue.c.
References fd, 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 1968 of file uipc_mqueue.c.
References fd.
Referenced by kern_kmq_notify(), and notifier_remove().
int sys_kmq_notify | ( | struct thread * | td, |
struct kmq_notify_args * | uap | ||
) |
Definition at line 2429 of file uipc_mqueue.c.
References ev, and kern_kmq_notify().
int sys_kmq_open | ( | struct thread * | td, |
struct kmq_open_args * | uap | ||
) |
Definition at line 2117 of file uipc_mqueue.c.
References flags, and kern_kmq_open().
int sys_kmq_setattr | ( | struct thread * | td, |
struct kmq_setattr_args * | uap | ||
) |
Definition at line 2251 of file uipc_mqueue.c.
References kern_kmq_setattr().
int sys_kmq_timedreceive | ( | struct thread * | td, |
struct kmq_timedreceive_args * | uap | ||
) |
Definition at line 2271 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 2299 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 2138 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 | , | ||
curmq | , | ||
CTLFLAG_RW | , | ||
& | curmq, | ||
0 | , | ||
"current message queue number" | |||
) |
SYSCTL_INT | ( | _kern_mqueue | , |
OID_AUTO | , | ||
maxmq | , | ||
CTLFLAG_RW | , | ||
& | maxmq, | ||
0 | , | ||
"maximum message queues" | |||
) |
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" | |||
) |
|
static |
TAILQ_HEAD | ( | msgq | , |
mqueue_msg | |||
) |
VFS_VOP_VECTOR_REGISTER | ( | mqfs_vnodeops | ) |
|
static |
Definition at line 217 of file uipc_mqueue.c.
Referenced by mqueue_alloc(), and mqueue_free().
|
static |
Definition at line 205 of file uipc_mqueue.c.
Referenced by mqueue_alloc().
|
static |
Definition at line 206 of file uipc_mqueue.c.
Referenced by mqueue_alloc().
|
static |
Definition at line 223 of file uipc_mqueue.c.
Referenced by mqfs_init(), and mqfs_uninit().
|
static |
Definition at line 214 of file uipc_mqueue.c.
Referenced by mqueue_alloc().
|
static |
Definition at line 208 of file uipc_mqueue.c.
Referenced by kern_kmq_open().
|
static |
Definition at line 211 of file uipc_mqueue.c.
Referenced by kern_kmq_open().
struct filterops mq_rfiltops |
Definition at line 279 of file uipc_mqueue.c.
Referenced by mqf_kqfilter().
|
static |
Definition at line 2712 of file uipc_mqueue.c.
Referenced by mqinit(), and mqunload().
struct filterops mq_wfiltops |
Definition at line 284 of file uipc_mqueue.c.
Referenced by mqf_kqfilter().
|
static |
Definition at line 226 of file uipc_mqueue.c.
Referenced by kern_kmq_open(), mqf_chmod(), mqf_chown(), mqf_close(), mqf_stat(), mqfs_init(), mqfs_mount(), mqfs_prison_remove(), mqfs_uninit(), and sys_kmq_unlink().
|
static |
Definition at line 233 of file uipc_mqueue.c.
Referenced by mqfs_init(), and mqfs_uninit().
|
static |
Definition at line 2695 of file uipc_mqueue.c.
|
static |
Definition at line 231 of file uipc_mqueue.c.
Referenced by mqfs_allocv().
|
static |
Definition at line 227 of file uipc_mqueue.c.
Referenced by mqfs_init(), mqfs_uninit(), mqnode_alloc(), and mqnode_free().
|
static |
Definition at line 230 of file uipc_mqueue.c.
Referenced by mqfs_init(), mqfs_uninit(), notifier_alloc(), and notifier_free().
|
static |
Definition at line 228 of file uipc_mqueue.c.
Referenced by mqfs_init(), mqfs_uninit(), mqueue_alloc(), and mqueue_free().
|
static |
Definition at line 2938 of file uipc_mqueue.c.
|
static |
Definition at line 2704 of file uipc_mqueue.c.
|
static |
Definition at line 232 of file uipc_mqueue.c.
Referenced by _getmq(), kern_kmq_open(), mq_proc_exit(), and mqueue_fdclose().
|
static |
Definition at line 229 of file uipc_mqueue.c.
Referenced by mqfs_allocv(), mqfs_init(), mqfs_reclaim(), and mqfs_uninit().
|
static |
Definition at line 220 of file uipc_mqueue.c.
Referenced by accept_filt_generic_mod_event(), and mqfs_uninit().