Deleted Added
full compact
filedesc.h (115702) filedesc.h (122514)
1/*
2 * Copyright (c) 1990, 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 * @(#)filedesc.h 8.1 (Berkeley) 6/2/93
1/*
2 * Copyright (c) 1990, 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 * @(#)filedesc.h 8.1 (Berkeley) 6/2/93
34 * $FreeBSD: head/sys/sys/filedesc.h 115702 2003-06-02 16:05:32Z tegge $
34 * $FreeBSD: head/sys/sys/filedesc.h 122514 2003-11-11 22:07:29Z jhb $
35 */
36
37#ifndef _SYS_FILEDESC_H_
38#define _SYS_FILEDESC_H_
39
40#include <sys/_lock.h>
41#include <sys/_mutex.h>
42#include <sys/queue.h>

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

132#define FILEDESC_LOCK_DESC "filedesc structure"
133
134/* Lock a file descriptor table. */
135#define FILEDESC_LOCK(fd) mtx_lock(&(fd)->fd_mtx)
136#define FILEDESC_UNLOCK(fd) mtx_unlock(&(fd)->fd_mtx)
137#define FILEDESC_LOCKED(fd) mtx_owned(&(fd)->fd_mtx)
138#define FILEDESC_LOCK_ASSERT(fd, type) mtx_assert(&(fd)->fd_mtx, (type))
139
35 */
36
37#ifndef _SYS_FILEDESC_H_
38#define _SYS_FILEDESC_H_
39
40#include <sys/_lock.h>
41#include <sys/_mutex.h>
42#include <sys/queue.h>

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

132#define FILEDESC_LOCK_DESC "filedesc structure"
133
134/* Lock a file descriptor table. */
135#define FILEDESC_LOCK(fd) mtx_lock(&(fd)->fd_mtx)
136#define FILEDESC_UNLOCK(fd) mtx_unlock(&(fd)->fd_mtx)
137#define FILEDESC_LOCKED(fd) mtx_owned(&(fd)->fd_mtx)
138#define FILEDESC_LOCK_ASSERT(fd, type) mtx_assert(&(fd)->fd_mtx, (type))
139
140struct thread;
141
140int closef(struct file *fp, struct thread *p);
141int dupfdopen(struct thread *td, struct filedesc *fdp, int indx, int dfd,
142 int mode, int error);
143int falloc(struct thread *p, struct file **resultfp, int *resultfd);
144int fdalloc(struct thread *p, int want, int *result);
145int fdavail(struct thread *td, int n);
146void fdcloseexec(struct thread *td);
147int fdcheckstd(struct thread *td);

--- 28 unchanged lines hidden ---
142int closef(struct file *fp, struct thread *p);
143int dupfdopen(struct thread *td, struct filedesc *fdp, int indx, int dfd,
144 int mode, int error);
145int falloc(struct thread *p, struct file **resultfp, int *resultfd);
146int fdalloc(struct thread *p, int want, int *result);
147int fdavail(struct thread *td, int n);
148void fdcloseexec(struct thread *td);
149int fdcheckstd(struct thread *td);

--- 28 unchanged lines hidden ---