Deleted Added
full compact
filedesc.h (237071) filedesc.h (237072)
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

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

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)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

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

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)filedesc.h 8.1 (Berkeley) 6/2/93
30 * $FreeBSD: head/sys/sys/filedesc.h 237071 2012-06-14 15:23:51Z pjd $
30 * $FreeBSD: head/sys/sys/filedesc.h 237072 2012-06-14 15:24:45Z pjd $
31 */
32
33#ifndef _SYS_FILEDESC_H_
34#define _SYS_FILEDESC_H_
35
36#include <sys/queue.h>
37#include <sys/event.h>
38#include <sys/lock.h>

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

100#define FILEDESC_XUNLOCK(fdp) sx_xunlock(&(fdp)->fd_sx)
101#define FILEDESC_SLOCK(fdp) sx_slock(&(fdp)->fd_sx)
102#define FILEDESC_SUNLOCK(fdp) sx_sunlock(&(fdp)->fd_sx)
103
104#define FILEDESC_LOCK_ASSERT(fdp) sx_assert(&(fdp)->fd_sx, SX_LOCKED | \
105 SX_NOTRECURSED)
106#define FILEDESC_XLOCK_ASSERT(fdp) sx_assert(&(fdp)->fd_sx, SX_XLOCKED | \
107 SX_NOTRECURSED)
31 */
32
33#ifndef _SYS_FILEDESC_H_
34#define _SYS_FILEDESC_H_
35
36#include <sys/queue.h>
37#include <sys/event.h>
38#include <sys/lock.h>

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

100#define FILEDESC_XUNLOCK(fdp) sx_xunlock(&(fdp)->fd_sx)
101#define FILEDESC_SLOCK(fdp) sx_slock(&(fdp)->fd_sx)
102#define FILEDESC_SUNLOCK(fdp) sx_sunlock(&(fdp)->fd_sx)
103
104#define FILEDESC_LOCK_ASSERT(fdp) sx_assert(&(fdp)->fd_sx, SX_LOCKED | \
105 SX_NOTRECURSED)
106#define FILEDESC_XLOCK_ASSERT(fdp) sx_assert(&(fdp)->fd_sx, SX_XLOCKED | \
107 SX_NOTRECURSED)
108#define FILEDESC_UNLOCK_ASSERT(fdp) sx_assert(&(fdp)->fd_sx, SX_UNLOCKED)
108
109struct thread;
110
111int closef(struct file *fp, struct thread *td);
112int dupfdopen(struct thread *td, struct filedesc *fdp, int dfd, int mode,
113 int openerror, int *indxp);
114int falloc(struct thread *td, struct file **resultfp, int *resultfd,
115 int flags);

--- 34 unchanged lines hidden ---
109
110struct thread;
111
112int closef(struct file *fp, struct thread *td);
113int dupfdopen(struct thread *td, struct filedesc *fdp, int dfd, int mode,
114 int openerror, int *indxp);
115int falloc(struct thread *td, struct file **resultfp, int *resultfd,
116 int flags);

--- 34 unchanged lines hidden ---