diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2019-03-31 11:33:12 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2019-03-31 11:33:12 +0000 |
commit | 61ecf39cf4a9e37a0c30fdb5977abd047055b03c (patch) | |
tree | 93b205ecb6e585662a55955dd5b3cff7c78bfcbb | |
parent | 7711711d3513f7caf3fc0e6e0118e15017e5baeb (diff) |
Move the prototypes of internal lockf functions from <sys/lockf.h>
to vfs_lockf.c. This makes the public interface clearer.
The declaration of variable lockf_debug is removed from the header
because it is not needed outside of vfs_lockf.c.
OK anton@ tedu@
-rw-r--r-- | sys/kern/vfs_lockf.c | 12 | ||||
-rw-r--r-- | sys/sys/lockf.h | 21 |
2 files changed, 12 insertions, 21 deletions
diff --git a/sys/kern/vfs_lockf.c b/sys/kern/vfs_lockf.c index ad02a82e6a1..1649bfd30eb 100644 --- a/sys/kern/vfs_lockf.c +++ b/sys/kern/vfs_lockf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_lockf.c,v 1.35 2019/02/24 09:24:52 anton Exp $ */ +/* $OpenBSD: vfs_lockf.c,v 1.36 2019/03/31 11:33:11 visa Exp $ */ /* $NetBSD: vfs_lockf.c,v 1.7 1996/02/04 02:18:21 christos Exp $ */ /* @@ -69,6 +69,9 @@ int maxlockdepth = MAXDEPTH; int lockf_debug = DEBUG_SETLOCK|DEBUG_CLEARLOCK|DEBUG_WAKELOCK; +void lf_print(const char *, struct lockf *); +void lf_printlist(const char *, struct lockf *); + #define DPRINTF(args, level) if (lockf_debug & (level)) printf args #define LFPRINT(args, level) if (lockf_debug & (level)) lf_print args #else @@ -76,6 +79,13 @@ int lockf_debug = DEBUG_SETLOCK|DEBUG_CLEARLOCK|DEBUG_WAKELOCK; #define LFPRINT(args, level) #endif +int lf_clearlock(struct lockf *); +int lf_findoverlap(struct lockf *, struct lockf *, int, struct lockf **); +struct lockf *lf_getblock(struct lockf *); +int lf_getlock(struct lockf *, struct flock *); +int lf_setlock(struct lockf *); +void lf_split(struct lockf *, struct lockf *); +void lf_wakelock(struct lockf *, int); void ls_ref(struct lockf_state *); void ls_rele(struct lockf_state *); diff --git a/sys/sys/lockf.h b/sys/sys/lockf.h index 867208c69af..e34ff9f299f 100644 --- a/sys/sys/lockf.h +++ b/sys/sys/lockf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: lockf.h,v 1.14 2019/01/30 17:04:04 anton Exp $ */ +/* $OpenBSD: lockf.h,v 1.15 2019/03/31 11:33:11 visa Exp $ */ /* $NetBSD: lockf.h,v 1.5 1994/06/29 06:44:33 cgd Exp $ */ /* @@ -73,25 +73,6 @@ __BEGIN_DECLS void lf_init(void); int lf_advlock(struct lockf_state **, off_t, caddr_t, int, struct flock *, int); -int lf_clearlock(struct lockf *); -int lf_findoverlap(struct lockf *, - struct lockf *, int, struct lockf **); -struct lockf * - lf_getblock(struct lockf *); -int lf_getlock(struct lockf *, struct flock *); -int lf_setlock(struct lockf *); void lf_purgelocks(struct lockf_state *); -void lf_split(struct lockf *, struct lockf *); -void lf_wakelock(struct lockf *, int); __END_DECLS - -#ifdef LOCKF_DEBUG -extern int lockf_debug; - -__BEGIN_DECLS -void lf_print(const char *, struct lockf *); -void lf_printlist(const char *, struct lockf *); -__END_DECLS -#endif /* LOCKF_DEBUG */ - #endif /* _KERNEL */ |