Home | History | Annotate | Line # | Download | only in fifofs
fifo.h revision 1.2
      1 /*
      2  * Copyright (c) 1991 The Regents of the University of California.
      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
      9  *    notice, this list of conditions and the following disclaimer.
     10  * 2. Redistributions in binary form must reproduce the above copyright
     11  *    notice, this list of conditions and the following disclaimer in the
     12  *    documentation and/or other materials provided with the distribution.
     13  * 3. All advertising materials mentioning features or use of this software
     14  *    must display the following acknowledgement:
     15  *	This product includes software developed by the University of
     16  *	California, Berkeley and its contributors.
     17  * 4. Neither the name of the University nor the names of its contributors
     18  *    may be used to endorse or promote products derived from this software
     19  *    without specific prior written permission.
     20  *
     21  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     22  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     24  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     25  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     26  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     27  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     28  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     29  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     30  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     31  * SUCH DAMAGE.
     32  *
     33  *	@(#)fifo.h	7.1 (Berkeley) 4/15/91
     34  */
     35 
     36 #ifndef _SYS_FIFO_H_
     37 #define _SYS_FIFO_H_
     38 
     39 #ifdef FIFO
     40 /*
     41  * Prototypes for fifo operations on vnodes.
     42  */
     43 int	fifo_badop(),
     44 	fifo_ebadf();
     45 
     46 int	fifo_lookup __P((
     47 		struct vnode *vp,
     48 		struct nameidata *ndp,
     49 		struct proc *p));
     50 #define fifo_create ((int (*) __P(( \
     51 		struct nameidata *ndp, \
     52 		struct vattr *vap, \
     53 		struct proc *p))) fifo_badop)
     54 #define fifo_mknod ((int (*) __P(( \
     55 		struct nameidata *ndp, \
     56 		struct vattr *vap, \
     57 		struct ucred *cred, \
     58 		struct proc *p))) fifo_badop)
     59 int	fifo_open __P((
     60 		struct vnode *vp,
     61 		int mode,
     62 		struct ucred *cred,
     63 		struct proc *p));
     64 int	fifo_close __P((
     65 		struct vnode *vp,
     66 		int fflag,
     67 		struct ucred *cred,
     68 		struct proc *p));
     69 #define fifo_access ((int (*) __P(( \
     70 		struct vnode *vp, \
     71 		int mode, \
     72 		struct ucred *cred, \
     73 		struct proc *p))) fifo_ebadf)
     74 #define fifo_getattr ((int (*) __P(( \
     75 		struct vnode *vp, \
     76 		struct vattr *vap, \
     77 		struct ucred *cred, \
     78 		struct proc *p))) fifo_ebadf)
     79 #define fifo_setattr ((int (*) __P(( \
     80 		struct vnode *vp, \
     81 		struct vattr *vap, \
     82 		struct ucred *cred, \
     83 		struct proc *p))) fifo_ebadf)
     84 int	fifo_read __P((
     85 		struct vnode *vp,
     86 		struct uio *uio,
     87 		int ioflag,
     88 		struct ucred *cred));
     89 int	fifo_write __P((
     90 		struct vnode *vp,
     91 		struct uio *uio,
     92 		int ioflag,
     93 		struct ucred *cred));
     94 int	fifo_ioctl __P((
     95 		struct vnode *vp,
     96 		int command,
     97 		caddr_t data,
     98 		int fflag,
     99 		struct ucred *cred,
    100 		struct proc *p));
    101 int	fifo_select __P((
    102 		struct vnode *vp,
    103 		int which,
    104 		int fflags,
    105 		struct ucred *cred,
    106 		struct proc *p));
    107 #define fifo_mmap ((int (*) __P(( \
    108 		struct vnode *vp, \
    109 		int fflags, \
    110 		struct ucred *cred, \
    111 		struct proc *p))) fifo_badop)
    112 #define fifo_fsync ((int (*) __P(( \
    113 		struct vnode *vp, \
    114 		int fflags, \
    115 		struct ucred *cred, \
    116 		int waitfor, \
    117 		struct proc *p))) nullop)
    118 #define fifo_seek ((int (*) __P(( \
    119 		struct vnode *vp, \
    120 		off_t oldoff, \
    121 		off_t newoff, \
    122 		struct ucred *cred))) fifo_badop)
    123 #define fifo_remove ((int (*) __P(( \
    124 		struct nameidata *ndp, \
    125 		struct proc *p))) fifo_badop)
    126 #define fifo_link ((int (*) __P(( \
    127 		struct vnode *vp, \
    128 		struct nameidata *ndp, \
    129 		struct proc *p))) fifo_badop)
    130 #define fifo_rename ((int (*) __P(( \
    131 		struct nameidata *fndp, \
    132 		struct nameidata *tdnp, \
    133 		struct proc *p))) fifo_badop)
    134 #define fifo_mkdir ((int (*) __P(( \
    135 		struct nameidata *ndp, \
    136 		struct vattr *vap, \
    137 		struct proc *p))) fifo_badop)
    138 #define fifo_rmdir ((int (*) __P(( \
    139 		struct nameidata *ndp, \
    140 		struct proc *p))) fifo_badop)
    141 #define fifo_symlink ((int (*) __P(( \
    142 		struct nameidata *ndp, \
    143 		struct vattr *vap, \
    144 		char *target, \
    145 		struct proc *p))) fifo_badop)
    146 #define fifo_readdir ((int (*) __P(( \
    147 		struct vnode *vp, \
    148 		struct uio *uio, \
    149 		struct ucred *cred, \
    150 		int *eofflagp))) fifo_badop)
    151 #define fifo_readlink ((int (*) __P(( \
    152 		struct vnode *vp, \
    153 		struct uio *uio, \
    154 		struct ucred *cred))) fifo_badop)
    155 #define fifo_abortop ((int (*) __P(( \
    156 		struct nameidata *ndp))) fifo_badop)
    157 #define fifo_inactive ((int (*) __P(( \
    158 		struct vnode *vp, \
    159 		struct proc *p))) nullop)
    160 #define fifo_reclaim ((int (*) __P(( \
    161 		struct vnode *vp))) nullop)
    162 int	fifo_lock __P((
    163 		struct vnode *vp));
    164 int	fifo_unlock __P((
    165 		struct vnode *vp));
    166 int	fifo_bmap __P((
    167 		struct vnode *vp,
    168 		daddr_t bn,
    169 		struct vnode **vpp,
    170 		daddr_t *bnp));
    171 #define fifo_strategy ((int (*) __P(( \
    172 		struct buf *bp))) fifo_badop)
    173 int	fifo_print __P((
    174 		struct vnode *vp));
    175 #define fifo_islocked ((int (*) __P(( \
    176 		struct vnode *vp))) nullop)
    177 int	fifo_advlock __P((
    178 		struct vnode *vp,
    179 		caddr_t id,
    180 		int op,
    181 		struct flock *fl,
    182 		int flags));
    183 #endif /* FIFO */
    184 
    185 #endif /* !_SYS_FIFO_H_ */
    186