Deleted Added
full compact
kern_lockf.c (87211) kern_lockf.c (92723)
1/*
2 * Copyright (c) 1982, 1986, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Scooter Morris at Genentech Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)ufs_lockf.c 8.3 (Berkeley) 1/6/94
1/*
2 * Copyright (c) 1982, 1986, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Scooter Morris at Genentech Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)ufs_lockf.c 8.3 (Berkeley) 1/6/94
37 * $FreeBSD: head/sys/kern/kern_lockf.c 87211 2001-12-02 12:47:25Z alfred $
37 * $FreeBSD: head/sys/kern/kern_lockf.c 92723 2002-03-19 21:25:46Z alfred $
38 */
39
40#include "opt_debug_lockf.h"
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/kernel.h>
45#include <sys/lock.h>

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

71SYSCTL_INT(_debug, OID_AUTO, lockf_debug, CTLFLAG_RW, &lockf_debug, 0, "");
72#endif
73
74MALLOC_DEFINE(M_LOCKF, "lockf", "Byte-range locking structures");
75
76#define NOLOCKF (struct lockf *)0
77#define SELF 0x1
78#define OTHERS 0x2
38 */
39
40#include "opt_debug_lockf.h"
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/kernel.h>
45#include <sys/lock.h>

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

71SYSCTL_INT(_debug, OID_AUTO, lockf_debug, CTLFLAG_RW, &lockf_debug, 0, "");
72#endif
73
74MALLOC_DEFINE(M_LOCKF, "lockf", "Byte-range locking structures");
75
76#define NOLOCKF (struct lockf *)0
77#define SELF 0x1
78#define OTHERS 0x2
79static int lf_clearlock __P((struct lockf *));
80static int lf_findoverlap __P((struct lockf *,
81 struct lockf *, int, struct lockf ***, struct lockf **));
79static int lf_clearlock(struct lockf *);
80static int lf_findoverlap(struct lockf *,
81 struct lockf *, int, struct lockf ***, struct lockf **);
82static struct lockf *
82static struct lockf *
83 lf_getblock __P((struct lockf *));
84static int lf_getlock __P((struct lockf *, struct flock *));
85static int lf_setlock __P((struct lockf *));
86static void lf_split __P((struct lockf *, struct lockf *));
87static void lf_wakelock __P((struct lockf *));
83 lf_getblock(struct lockf *);
84static int lf_getlock(struct lockf *, struct flock *);
85static int lf_setlock(struct lockf *);
86static void lf_split(struct lockf *, struct lockf *);
87static void lf_wakelock(struct lockf *);
88
89/*
90 * Advisory record locking support
91 */
92int
93lf_advlock(ap, head, size)
94 struct vop_advlock_args /* {
95 struct vnode *a_vp;

--- 751 unchanged lines hidden ---
88
89/*
90 * Advisory record locking support
91 */
92int
93lf_advlock(ap, head, size)
94 struct vop_advlock_args /* {
95 struct vnode *a_vp;

--- 751 unchanged lines hidden ---