Deleted Added
full compact
lockf.h (178243) lockf.h (180025)
1/*-
2 * Copyright (c) 1991, 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

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

25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)lockf.h 8.1 (Berkeley) 6/11/93
1/*-
2 * Copyright (c) 1991, 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

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

25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)lockf.h 8.1 (Berkeley) 6/11/93
33 * $FreeBSD: head/sys/sys/lockf.h 178243 2008-04-16 11:33:32Z kib $
33 * $FreeBSD: head/sys/sys/lockf.h 180025 2008-06-26 10:21:54Z dfr $
34 */
35
36#ifndef _SYS_LOCKF_H_
37#define _SYS_LOCKF_H_
38
39#include <sys/queue.h>
40#include <sys/_lock.h>
41#include <sys/_sx.h>
42
34 */
35
36#ifndef _SYS_LOCKF_H_
37#define _SYS_LOCKF_H_
38
39#include <sys/queue.h>
40#include <sys/_lock.h>
41#include <sys/_sx.h>
42
43struct flock;
43struct vop_advlock_args;
44struct vop_advlockasync_args;
45
46/*
47 * The lockf_entry structure is a kernel structure which contains the
48 * information associated with a byte range lock. The lockf_entry
49 * structures are linked into the inode structure. Locks are sorted by
50 * the starting byte of the lock for efficiency.

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

113 LIST_ENTRY(lockf) ls_link; /* (S) all active lockf states */
114 struct sx ls_lock;
115 struct lockf_entry_list ls_active; /* (s) Active locks */
116 struct lockf_entry_list ls_pending; /* (s) Pending locks */
117 int ls_threads; /* (i) Thread count */
118};
119LIST_HEAD(lockf_list, lockf);
120
44struct vop_advlock_args;
45struct vop_advlockasync_args;
46
47/*
48 * The lockf_entry structure is a kernel structure which contains the
49 * information associated with a byte range lock. The lockf_entry
50 * structures are linked into the inode structure. Locks are sorted by
51 * the starting byte of the lock for efficiency.

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

114 LIST_ENTRY(lockf) ls_link; /* (S) all active lockf states */
115 struct sx ls_lock;
116 struct lockf_entry_list ls_active; /* (s) Active locks */
117 struct lockf_entry_list ls_pending; /* (s) Pending locks */
118 int ls_threads; /* (i) Thread count */
119};
120LIST_HEAD(lockf_list, lockf);
121
122typedef int lf_iterator(struct vnode *, struct flock *, void *);
123
121int lf_advlock(struct vop_advlock_args *, struct lockf **, u_quad_t);
122int lf_advlockasync(struct vop_advlockasync_args *, struct lockf **, u_quad_t);
123void lf_purgelocks(struct vnode *vp, struct lockf **statep);
124int lf_advlock(struct vop_advlock_args *, struct lockf **, u_quad_t);
125int lf_advlockasync(struct vop_advlockasync_args *, struct lockf **, u_quad_t);
126void lf_purgelocks(struct vnode *vp, struct lockf **statep);
127int lf_iteratelocks_sysid(int sysid, lf_iterator *, void *);
128int lf_iteratelocks_vnode(struct vnode *vp, lf_iterator *, void *);
124int lf_countlocks(int sysid);
125void lf_clearremotesys(int sysid);
126
127#endif /* !_SYS_LOCKF_H_ */
129int lf_countlocks(int sysid);
130void lf_clearremotesys(int sysid);
131
132#endif /* !_SYS_LOCKF_H_ */