Source-Changes-HG archive

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

[src/trunk]: src/sys/kern wapbl_advance and friends are only used in the kernel



details:   https://anonhg.NetBSD.org/src/rev/7dce63803dd9
branches:  trunk
changeset: 789982:7dce63803dd9
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sat Sep 14 13:19:50 2013 +0000

description:
wapbl_advance and friends are only used in the kernel

diffstat:

 sys/kern/vfs_wapbl.c |  30 ++++++++++++++----------------
 1 files changed, 14 insertions(+), 16 deletions(-)

diffs (72 lines):

diff -r 0a3c4046c4a5 -r 7dce63803dd9 sys/kern/vfs_wapbl.c
--- a/sys/kern/vfs_wapbl.c      Sat Sep 14 13:19:18 2013 +0000
+++ b/sys/kern/vfs_wapbl.c      Sat Sep 14 13:19:50 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_wapbl.c,v 1.55 2013/02/09 00:32:12 christos Exp $  */
+/*     $NetBSD: vfs_wapbl.c,v 1.56 2013/09/14 13:19:50 joerg Exp $     */
 
 /*-
  * Copyright (c) 2003, 2008, 2009 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 #define WAPBL_INTERNAL
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_wapbl.c,v 1.55 2013/02/09 00:32:12 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_wapbl.c,v 1.56 2013/09/14 13:19:50 joerg Exp $");
 
 #include <sys/param.h>
 #include <sys/bitops.h>
@@ -209,8 +209,6 @@
 
 static int wapbl_replay_process(struct wapbl_replay *wr, off_t, off_t);
 
-static inline size_t wapbl_space_free(size_t avail, off_t head,
-       off_t tail);
 static inline size_t wapbl_space_used(size_t avail, off_t head,
        off_t tail);
 
@@ -1124,6 +1122,18 @@
 /****************************************************************/
 /* Some utility inlines */
 
+static inline size_t
+wapbl_space_used(size_t avail, off_t head, off_t tail)
+{
+
+       if (tail == 0) {
+               KASSERT(head == 0);
+               return 0;
+       }
+       return ((head + (avail - 1) - tail) % avail) + 1;
+}
+
+#ifdef _KERNEL
 /* This is used to advance the pointer at old to new value at old+delta */
 static inline off_t
 wapbl_advance(size_t size, size_t off, off_t old, size_t delta)
@@ -1154,17 +1164,6 @@
 }
 
 static inline size_t
-wapbl_space_used(size_t avail, off_t head, off_t tail)
-{
-
-       if (tail == 0) {
-               KASSERT(head == 0);
-               return 0;
-       }
-       return ((head + (avail - 1) - tail) % avail) + 1;
-}
-
-static inline size_t
 wapbl_space_free(size_t avail, off_t head, off_t tail)
 {
 
@@ -1202,7 +1201,6 @@
        *tailp = tail;
 }
 
-#ifdef _KERNEL
 
 /****************************************************************/
 



Home | Main Index | Thread Index | Old Index