uipc_mqueue.c (9da8a32aaef3c8360d18152fbd86e29d95b3ae48) uipc_mqueue.c (102178d0df04bef44962ff3a8b19cf18b23a3d0e)
1/*-
2 * Copyright (c) 2005 David Xu <davidxu@freebsd.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 205 unchanged lines hidden (view full) ---

214static struct fileops mqueueops;
215
216/*
217 * Directory structure construction and manipulation
218 */
219#ifdef notyet
220static struct mqfs_node *mqfs_create_dir(struct mqfs_node *parent,
221 const char *name, int namelen);
1/*-
2 * Copyright (c) 2005 David Xu <davidxu@freebsd.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 205 unchanged lines hidden (view full) ---

214static struct fileops mqueueops;
215
216/*
217 * Directory structure construction and manipulation
218 */
219#ifdef notyet
220static struct mqfs_node *mqfs_create_dir(struct mqfs_node *parent,
221 const char *name, int namelen);
222static struct mqfs_node *mqfs_create_link(struct mqfs_node *parent,
223 const char *name, int namelen);
222#endif
223
224static struct mqfs_node *mqfs_create_file(struct mqfs_node *parent,
225 const char *name, int namelen);
224#endif
225
226static struct mqfs_node *mqfs_create_file(struct mqfs_node *parent,
227 const char *name, int namelen);
226struct mqfs_node *mqfs_create_link(struct mqfs_node *parent,
227 const char *name, int namelen);
228static int mqfs_destroy(struct mqfs_node *mn);
229static void mqfs_fileno_alloc(struct mqfs_info *mi, struct mqfs_node *mn);
230static void mqfs_fileno_free(struct mqfs_info *mi, struct mqfs_node *mn);
231static int mqfs_allocv(struct mount *mp, struct vnode **vpp, struct mqfs_node *pn);
232
233/*
234 * Message queue construction and maniplation
235 */

--- 1604 unchanged lines hidden (view full) ---

1840
1841 LIST_FOREACH(nt, &p->p_mqnotifier, nt_link) {
1842 if (nt->nt_ksi.ksi_mqd == fd)
1843 break;
1844 }
1845 return (nt);
1846}
1847
228static int mqfs_destroy(struct mqfs_node *mn);
229static void mqfs_fileno_alloc(struct mqfs_info *mi, struct mqfs_node *mn);
230static void mqfs_fileno_free(struct mqfs_info *mi, struct mqfs_node *mn);
231static int mqfs_allocv(struct mount *mp, struct vnode **vpp, struct mqfs_node *pn);
232
233/*
234 * Message queue construction and maniplation
235 */

--- 1604 unchanged lines hidden (view full) ---

1840
1841 LIST_FOREACH(nt, &p->p_mqnotifier, nt_link) {
1842 if (nt->nt_ksi.ksi_mqd == fd)
1843 break;
1844 }
1845 return (nt);
1846}
1847
1848static void
1848static __inline void
1849notifier_insert(struct proc *p, struct mqueue_notifier *nt)
1850{
1851 LIST_INSERT_HEAD(&p->p_mqnotifier, nt, nt_link);
1852}
1853
1849notifier_insert(struct proc *p, struct mqueue_notifier *nt)
1850{
1851 LIST_INSERT_HEAD(&p->p_mqnotifier, nt, nt_link);
1852}
1853
1854static void
1854static __inline void
1855notifier_delete(struct proc *p, struct mqueue_notifier *nt)
1856{
1857 LIST_REMOVE(nt, nt_link);
1858 notifier_free(nt);
1859}
1860
1861static void
1862notifier_remove(struct proc *p, struct mqueue *mq, int fd)

--- 611 unchanged lines hidden ---
1855notifier_delete(struct proc *p, struct mqueue_notifier *nt)
1856{
1857 LIST_REMOVE(nt, nt_link);
1858 notifier_free(nt);
1859}
1860
1861static void
1862notifier_remove(struct proc *p, struct mqueue *mq, int fd)

--- 611 unchanged lines hidden ---