file.h (86341) | file.h (86487) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. 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 --- 17 unchanged lines hidden (view full) --- 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 * @(#)file.h 8.3 (Berkeley) 1/9/95 | 1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. 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 --- 17 unchanged lines hidden (view full) --- 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 * @(#)file.h 8.3 (Berkeley) 1/9/95 |
34 * $FreeBSD: head/sys/sys/file.h 86341 2001-11-14 06:30:36Z dillon $ | 34 * $FreeBSD: head/sys/sys/file.h 86487 2001-11-17 03:07:11Z dillon $ |
35 */ 36 37#ifndef _SYS_FILE_H_ 38#define _SYS_FILE_H_ 39 40#ifndef _KERNEL 41#include <sys/fcntl.h> 42#include <sys/unistd.h> 43#endif 44 45#ifdef _KERNEL 46#include <sys/queue.h> 47 48struct stat; 49struct thread; 50struct uio; 51struct knote; 52struct vnode; | 35 */ 36 37#ifndef _SYS_FILE_H_ 38#define _SYS_FILE_H_ 39 40#ifndef _KERNEL 41#include <sys/fcntl.h> 42#include <sys/unistd.h> 43#endif 44 45#ifdef _KERNEL 46#include <sys/queue.h> 47 48struct stat; 49struct thread; 50struct uio; 51struct knote; 52struct vnode; |
53struct socket; |
|
53 54/* 55 * Kernel descriptor table. 56 * One entry for each open kernel vnode and socket. 57 */ 58struct file { 59 LIST_ENTRY(file) f_list;/* list of active files */ 60 short f_FILLER3; /* (old f_flag) */ --- 53 unchanged lines hidden (view full) --- 114int fget_read __P((struct thread *td, int fd, struct file **fpp)); 115int fget_write __P((struct thread *td, int fd, struct file **fpp)); 116int fdrop __P((struct file *fp, struct thread *td)); 117 118int fgetvp __P((struct thread *td, int fd, struct vnode **vpp)); 119int fgetvp_read __P((struct thread *td, int fd, struct vnode **vpp)); 120int fgetvp_write __P((struct thread *td, int fd, struct vnode **vpp)); 121 | 54 55/* 56 * Kernel descriptor table. 57 * One entry for each open kernel vnode and socket. 58 */ 59struct file { 60 LIST_ENTRY(file) f_list;/* list of active files */ 61 short f_FILLER3; /* (old f_flag) */ --- 53 unchanged lines hidden (view full) --- 115int fget_read __P((struct thread *td, int fd, struct file **fpp)); 116int fget_write __P((struct thread *td, int fd, struct file **fpp)); 117int fdrop __P((struct file *fp, struct thread *td)); 118 119int fgetvp __P((struct thread *td, int fd, struct vnode **vpp)); 120int fgetvp_read __P((struct thread *td, int fd, struct vnode **vpp)); 121int fgetvp_write __P((struct thread *td, int fd, struct vnode **vpp)); 122 |
123int fgetsock __P((struct thread *td, int fd, struct socket **spp, u_int *fflagp)); 124void fputsock __P((struct socket *sp)); 125 |
|
122static __inline void 123fhold(fp) 124 struct file *fp; 125{ 126 127 fp->f_count++; 128} 129 --- 110 unchanged lines hidden --- | 126static __inline void 127fhold(fp) 128 struct file *fp; 129{ 130 131 fp->f_count++; 132} 133 --- 110 unchanged lines hidden --- |