Source-Changes-HG archive

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

[src/trunk]: src/sys move implementation details from blist.h into subr_blist.c.



details:   https://anonhg.NetBSD.org/src/rev/1e64fc72e199
branches:  trunk
changeset: 580045:1e64fc72e199
user:      yamt <yamt%NetBSD.org@localhost>
date:      Wed Apr 06 11:36:37 2005 +0000

description:
move implementation details from blist.h into subr_blist.c.

diffstat:

 sys/kern/subr_blist.c |  27 +++++++++++++++++++++++++--
 sys/sys/blist.h       |  24 ++----------------------
 2 files changed, 27 insertions(+), 24 deletions(-)

diffs (87 lines):

diff -r 28c845588419 -r 1e64fc72e199 sys/kern/subr_blist.c
--- a/sys/kern/subr_blist.c     Wed Apr 06 11:35:54 2005 +0000
+++ b/sys/kern/subr_blist.c     Wed Apr 06 11:36:37 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_blist.c,v 1.3 2005/04/06 11:35:54 yamt Exp $      */
+/*     $NetBSD: subr_blist.c,v 1.4 2005/04/06 11:36:37 yamt Exp $      */
 
 /*-
  * Copyright (c) 1998 Matthew Dillon.  All Rights Reserved.
@@ -86,7 +86,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_blist.c,v 1.3 2005/04/06 11:35:54 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_blist.c,v 1.4 2005/04/06 11:36:37 yamt Exp $");
 #if 0
 __FBSDID("$FreeBSD: src/sys/kern/subr_blist.c,v 1.17 2004/06/04 04:03:25 alc Exp $");
 #endif
@@ -124,6 +124,29 @@
 #endif
 
 /*
+ * blmeta and bl_bitmap_t MUST be a power of 2 in size.
+ */
+
+typedef struct blmeta {
+       union {
+           uint64_t    bmu_avail;      /* space available under us     */
+           uint64_t    bmu_bitmap;     /* bitmap if we are a leaf      */
+       } u;
+       uint64_t        bm_bighint;     /* biggest contiguous block hint*/
+} blmeta_t;
+
+struct blist {
+       uint64_t                bl_blocks;      /* area of coverage             */
+       uint64_t                bl_radix;       /* coverage radix               */
+       uint64_t                bl_skip;        /* starting skip                */
+       uint64_t                bl_free;        /* number of free blocks        */
+       blmeta_t        *bl_root;       /* root of radix tree           */
+       uint64_t                bl_rootblks;    /* blks allocated for tree */
+};
+
+#define BLIST_META_RADIX       16
+
+/*
  * static support functions
  */
 
diff -r 28c845588419 -r 1e64fc72e199 sys/sys/blist.h
--- a/sys/sys/blist.h   Wed Apr 06 11:35:54 2005 +0000
+++ b/sys/sys/blist.h   Wed Apr 06 11:36:37 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: blist.h,v 1.3 2005/04/06 11:35:54 yamt Exp $   */
+/*     $NetBSD: blist.h,v 1.4 2005/04/06 11:36:37 yamt Exp $   */
 
 /*-
  * Copyright (c) 1998 Matthew Dillon.  All Rights Reserved.
@@ -64,28 +64,8 @@
 
 #define BLIST_NONE     ((uint64_t)-1)
 
-/*
- * blmeta and bl_bitmap_t MUST be a power of 2 in size.
- */
+typedef struct blist *blist_t;
 
-typedef struct blmeta {
-       union {
-           uint64_t    bmu_avail;      /* space available under us     */
-           uint64_t    bmu_bitmap;     /* bitmap if we are a leaf      */
-       } u;
-       uint64_t        bm_bighint;     /* biggest contiguous block hint*/
-} blmeta_t;
-
-typedef struct blist {
-       uint64_t                bl_blocks;      /* area of coverage             */
-       uint64_t                bl_radix;       /* coverage radix               */
-       uint64_t                bl_skip;        /* starting skip                */
-       uint64_t                bl_free;        /* number of free blocks        */
-       blmeta_t        *bl_root;       /* root of radix tree           */
-       uint64_t                bl_rootblks;    /* blks allocated for tree */
-} *blist_t;
-
-#define BLIST_META_RADIX       16
 #define BLIST_BMAP_RADIX       (sizeof(uint64_t)*8)
 
 #define BLIST_MAX_ALLOC                BLIST_BMAP_RADIX



Home | Main Index | Thread Index | Old Index