Source-Changes-HG archive

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

[src/trunk]: src/sys/kern - add missing function prototypes.



details:   https://anonhg.NetBSD.org/src/rev/7de9efa44c02
branches:  trunk
changeset: 570039:7de9efa44c02
user:      yamt <yamt%NetBSD.org@localhost>
date:      Sat Sep 18 16:01:03 2004 +0000

description:
- add missing function prototypes.
- fix prototype mismatches.

diffstat:

 sys/kern/vfs_bio.c |  37 ++++++++++++++++++++++++-------------
 1 files changed, 24 insertions(+), 13 deletions(-)

diffs (79 lines):

diff -r 78b7ec2893b0 -r 7de9efa44c02 sys/kern/vfs_bio.c
--- a/sys/kern/vfs_bio.c        Sat Sep 18 11:47:37 2004 +0000
+++ b/sys/kern/vfs_bio.c        Sat Sep 18 16:01:03 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_bio.c,v 1.129 2004/09/08 10:20:15 yamt Exp $       */
+/*     $NetBSD: vfs_bio.c,v 1.130 2004/09/18 16:01:03 yamt Exp $       */
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -81,7 +81,7 @@
 #include "opt_softdep.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.129 2004/09/08 10:20:15 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.130 2004/09/18 16:01:03 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -115,6 +115,24 @@
 u_int  bufpages = BUFPAGES;    /* optional hardwired count */
 u_int  bufcache = BUFCACHE;    /* max % of RAM to use for buffer cache */
 
+/* Function prototypes */
+struct bqueues;
+
+static int buf_trim(void);
+static void *bufpool_page_alloc(struct pool *, int);
+static void bufpool_page_free(struct pool *, void *);
+static __inline struct buf *bio_doread(struct vnode *, daddr_t, int,
+    struct ucred *, int);
+static int buf_lotsfree(void);
+static int buf_canrelease(void);
+static __inline u_long buf_mempoolidx(u_long);
+static __inline u_long buf_roundsize(u_long);
+static __inline caddr_t buf_malloc(size_t);
+static void buf_mrelease(caddr_t, size_t);
+int count_lock_queue(void); /* XXX */
+#ifdef DEBUG
+static int checkfreelist(struct buf *, struct bqueues *);
+#endif
 
 /* Macros to clear/set/test flags. */
 #define        SET(t, f)       (t) |= (f)
@@ -226,15 +244,6 @@
        return 0;
 }
 
-static int buf_trim(void);
-
-/*
- * bread()/breadn() helper.
- */
-static __inline struct buf *bio_doread(struct vnode *, daddr_t, int,
-                                       struct ucred *, int);
-int count_lock_queue(void);
-
 /*
  * Insq/Remq for the buffer free lists.
  * Call with buffer queue locked.
@@ -528,7 +537,9 @@
        pool_put(&bmempools[buf_mempoolidx(size)], addr);
 }
 
-
+/*
+ * bread()/breadn() helper.
+ */
 static __inline struct buf *
 bio_doread(struct vnode *vp, daddr_t blkno, int size, struct ucred *cred,
     int async)
@@ -1247,7 +1258,7 @@
  * Called at splbio and with queue lock held.
  * Returns the amount of buffer memory freed.
  */
-int
+static int
 buf_trim(void)
 {
        struct buf *bp;



Home | Main Index | Thread Index | Old Index