Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys don't export lockf internal functions.



details:   https://anonhg.NetBSD.org/src/rev/6b22aa442aa6
branches:  trunk
changeset: 546548:6b22aa442aa6
user:      yamt <yamt%NetBSD.org@localhost>
date:      Thu May 01 12:49:16 2003 +0000

description:
don't export lockf internal functions.

diffstat:

 sys/kern/vfs_lockf.c |  36 +++++++++++++++++++++++++-----------
 sys/sys/lockf.h      |  21 +--------------------
 2 files changed, 26 insertions(+), 31 deletions(-)

diffs (158 lines):

diff -r d17f0c759f4c -r 6b22aa442aa6 sys/kern/vfs_lockf.c
--- a/sys/kern/vfs_lockf.c      Thu May 01 12:45:31 2003 +0000
+++ b/sys/kern/vfs_lockf.c      Thu May 01 12:49:16 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_lockf.c,v 1.23 2003/03/05 18:28:22 mycroft Exp $   */
+/*     $NetBSD: vfs_lockf.c,v 1.24 2003/05/01 12:49:17 yamt Exp $      */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_lockf.c,v 1.23 2003/03/05 18:28:22 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_lockf.c,v 1.24 2003/05/01 12:49:17 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -67,6 +67,20 @@
 #define SELF   0x1
 #define OTHERS 0x2
 
+static int lf_clearlock __P((struct lockf *));
+static int lf_findoverlap __P((struct lockf *,
+           struct lockf *, int, struct lockf ***, struct lockf **));
+static struct lockf * lf_getblock __P((struct lockf *));
+static int lf_getlock __P((struct lockf *, struct flock *));
+static int lf_setlock __P((struct lockf *));
+static void lf_split __P((struct lockf *, struct lockf *));
+static void lf_wakelock __P((struct lockf *));
+
+#ifdef LOCKF_DEBUG
+static void lf_print __P((char *, struct lockf *));
+static void lf_printlist __P((char *, struct lockf *));
+#endif
+
 /*
  * XXX TODO
  * Misc cleanups: "caddr_t id" should be visible in the API as a
@@ -189,7 +203,7 @@
 /*
  * Set a byte-range lock.
  */
-int
+static int
 lf_setlock(lock)
        struct lockf *lock;
 {
@@ -444,7 +458,7 @@
  * Generally, find the lock (or an overlap to that lock)
  * and remove it (or shrink it), then wakeup anyone we can.
  */
-int
+static int
 lf_clearlock(unlock)
        struct lockf *unlock;
 {
@@ -514,7 +528,7 @@
  * Check whether there is a blocking lock,
  * and if so return its process identifier.
  */
-int
+static int
 lf_getlock(lock, fl)
        struct lockf *lock;
        struct flock *fl;
@@ -548,7 +562,7 @@
  * Walk the list of locks for an inode and
  * return the first blocking lock.
  */
-struct lockf *
+static struct lockf *
 lf_getblock(lock)
        struct lockf *lock;
 {
@@ -577,7 +591,7 @@
  * NOTE: this returns only the FIRST overlapping lock.  There
  *      may be more than one.
  */
-int
+static int
 lf_findoverlap(lf, lock, type, prev, overlap)
        struct lockf *lf;
        struct lockf *lock;
@@ -687,7 +701,7 @@
  * Split a lock and a contained region into
  * two or three locks as necessary.
  */
-void
+static void
 lf_split(lock1, lock2)
        struct lockf *lock1;
        struct lockf *lock2;
@@ -734,7 +748,7 @@
 /*
  * Wakeup a blocklist
  */
-void
+static void
 lf_wakelock(listhead)
        struct lockf *listhead;
 {
@@ -756,7 +770,7 @@
 /*
  * Print out a lock.
  */
-void
+static void
 lf_print(tag, lock)
        char *tag;
        struct lockf *lock;
@@ -778,7 +792,7 @@
                printf("\n");
 }
 
-void
+static void
 lf_printlist(tag, lock)
        char *tag;
        struct lockf *lock;
diff -r d17f0c759f4c -r 6b22aa442aa6 sys/sys/lockf.h
--- a/sys/sys/lockf.h   Thu May 01 12:45:31 2003 +0000
+++ b/sys/sys/lockf.h   Thu May 01 12:49:16 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lockf.h,v 1.11 2003/03/05 18:28:23 mycroft Exp $       */
+/*     $NetBSD: lockf.h,v 1.12 2003/05/01 12:49:16 yamt Exp $  */
 
 /*
  * Copyright (c) 1991, 1993
@@ -75,28 +75,9 @@
 #ifdef _KERNEL
 
 __BEGIN_DECLS
-void    lf_addblock __P((struct lockf *, struct lockf *));
 int     lf_advlock __P((struct vop_advlock_args *, struct lockf **, off_t));
-int     lf_clearlock __P((struct lockf *));
-int     lf_findoverlap __P((struct lockf *,
-           struct lockf *, int, struct lockf ***, struct lockf **));
-struct lockf *
-        lf_getblock __P((struct lockf *));
-int     lf_getlock __P((struct lockf *, struct flock *));
-int     lf_setlock __P((struct lockf *));
-void    lf_split __P((struct lockf *, struct lockf *));
-void    lf_wakelock __P((struct lockf *));
 __END_DECLS
 
-#ifdef LOCKF_DEBUG
-extern int lockf_debug;
-
-__BEGIN_DECLS
-void   lf_print __P((char *, struct lockf *));
-void   lf_printlist __P((char *, struct lockf *));
-__END_DECLS
-#endif /* LOCKF_DEBUG */
-
 #endif /* _KERNEL */
 
 #endif /* !_SYS_LOCKF_H_ */



Home | Main Index | Thread Index | Old Index