\hypertarget{subr__blist_8c_source}{}\doxysection{subr\+\_\+blist.\+c}
\label{subr__blist_8c_source}\index{kern/subr\_blist.c@{kern/subr\_blist.c}}
\mbox{\hyperlink{subr__blist_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/3-\/Clause}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 1998 Matthew Dillon.  All Rights Reserved.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00005}00005 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00006}00006 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00007}00007 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00008}00008 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00009}00009 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00010}00010 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00012}00012 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00013}00013 \textcolor{comment}{ * 3. Neither the name of the University nor the names of its contributors}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00014}00014 \textcolor{comment}{ *    may be used to endorse or promote products derived from this software}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00015}00015 \textcolor{comment}{ *    without specific prior written permission.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00016}00016 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00017}00017 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00018}00018 \textcolor{comment}{ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00019}00019 \textcolor{comment}{ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00020}00020 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00021}00021 \textcolor{comment}{ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00022}00022 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00023}00023 \textcolor{comment}{ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00024}00024 \textcolor{comment}{ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00025}00025 \textcolor{comment}{ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00026}00026 \textcolor{comment}{ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00027}00027 \textcolor{comment}{ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00028}00028 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00029}00029 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00030}00030 \textcolor{comment}{ * BLIST.C -\/    Bitmap allocator/deallocator, using a radix tree with hinting}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00031}00031 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00032}00032 \textcolor{comment}{ *      This module implements a general bitmap allocator/deallocator.  The}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00033}00033 \textcolor{comment}{ *      allocator eats around 2 bits per 'block'.  The module does not}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00034}00034 \textcolor{comment}{ *      try to interpret the meaning of a 'block' other than to return}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00035}00035 \textcolor{comment}{ *      SWAPBLK\_NONE on an allocation failure.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00036}00036 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00037}00037 \textcolor{comment}{ *      A radix tree controls access to pieces of the bitmap, and includes}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00038}00038 \textcolor{comment}{ *      auxiliary information at each interior node about the availabilty of}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00039}00039 \textcolor{comment}{ *      contiguous free blocks in the subtree rooted at that node.  A radix}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00040}00040 \textcolor{comment}{ *      constant defines the size of the bitmaps contained in a leaf node}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00041}00041 \textcolor{comment}{ *      and the number of descendents of each of the meta (interior) nodes.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00042}00042 \textcolor{comment}{ *      Each subtree is associated with a range of blocks.  The root of any}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00043}00043 \textcolor{comment}{ *      subtree stores a hint field that defines an upper bound on the size}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00044}00044 \textcolor{comment}{ *      of the largest allocation that can begin in the associated block}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00045}00045 \textcolor{comment}{ *      range.  A hint is an upper bound on a potential allocation, but not}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00046}00046 \textcolor{comment}{ *      necessarily a tight upper bound.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00047}00047 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00048}00048 \textcolor{comment}{ *      The bitmap field in each node directs the search for available blocks.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00049}00049 \textcolor{comment}{ *      For a leaf node, a bit is set if the corresponding block is free.  For a}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00050}00050 \textcolor{comment}{ *      meta node, a bit is set if the corresponding subtree contains a free}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00051}00051 \textcolor{comment}{ *      block somewhere within it.  The search at a meta node considers only}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00052}00052 \textcolor{comment}{ *      children of that node that represent a range that includes a free block.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00053}00053 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00054}00054 \textcolor{comment}{ *      The hinting greatly increases code efficiency for allocations while}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00055}00055 \textcolor{comment}{ *      the general radix structure optimizes both allocations and frees.  The}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00056}00056 \textcolor{comment}{ *      radix tree should be able to operate well no matter how much}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00057}00057 \textcolor{comment}{ *      fragmentation there is and no matter how large a bitmap is used.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00058}00058 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00059}00059 \textcolor{comment}{ *      The blist code wires all necessary memory at creation time.  Neither}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00060}00060 \textcolor{comment}{ *      allocations nor frees require interaction with the memory subsystem.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00061}00061 \textcolor{comment}{ *      The non-\/blocking nature of allocations and frees is required by swap}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00062}00062 \textcolor{comment}{ *      code (vm/swap\_pager.c).}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00063}00063 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00064}00064 \textcolor{comment}{ *      LAYOUT: The radix tree is laid out recursively using a linear array.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00065}00065 \textcolor{comment}{ *      Each meta node is immediately followed (laid out sequentially in}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00066}00066 \textcolor{comment}{ *      memory) by BLIST\_RADIX lower-\/level nodes.  This is a recursive}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00067}00067 \textcolor{comment}{ *      structure but one that can be easily scanned through a very simple}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00068}00068 \textcolor{comment}{ *      'skip' calculation.  The memory allocation is only large enough to}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00069}00069 \textcolor{comment}{ *      cover the number of blocks requested at creation time.  Nodes that}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00070}00070 \textcolor{comment}{ *      represent blocks beyond that limit, nodes that would never be read}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00071}00071 \textcolor{comment}{ *      or written, are not allocated, so that the last of the}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00072}00072 \textcolor{comment}{ *      BLIST\_RADIX lower-\/level nodes of a some nodes may not be allocated.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00073}00073 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00074}00074 \textcolor{comment}{ *      NOTE: the allocator cannot currently allocate more than}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00075}00075 \textcolor{comment}{ *      BLIST\_RADIX blocks per call.  It will panic with 'allocation too}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00076}00076 \textcolor{comment}{ *      large' if you try.  This is an area that could use improvement.  The}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00077}00077 \textcolor{comment}{ *      radix is large enough that this restriction does not effect the swap}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00078}00078 \textcolor{comment}{ *      system, though.  Currently only the allocation code is affected by}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00079}00079 \textcolor{comment}{ *      this algorithmic unfeature.  The freeing code can handle arbitrary}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00080}00080 \textcolor{comment}{ *      ranges.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00081}00081 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00082}00082 \textcolor{comment}{ *      This code can be compiled stand-\/alone for debugging.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00083}00083 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00084}00084 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00085}00085 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00086}\mbox{\hyperlink{subr__blist_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00086}} \mbox{\hyperlink{subr__blist_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00087}00087 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00088}00088 \textcolor{preprocessor}{\#ifdef \_KERNEL}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00089}00089 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00090}00090 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00091}00091 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00092}00092 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00093}00093 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00094}00094 \textcolor{preprocessor}{\#include <sys/blist.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00095}00095 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00096}00096 \textcolor{preprocessor}{\#include <sys/sbuf.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00097}00097 \textcolor{preprocessor}{\#include <sys/proc.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00098}00098 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00099}00099 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00100}00100 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00101}00101 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00102}00102 \textcolor{preprocessor}{\#ifndef BLIST\_NO\_DEBUG}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00103}00103 \textcolor{preprocessor}{\#define BLIST\_DEBUG}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00104}00104 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00105}00105 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00106}00106 \textcolor{preprocessor}{\#include <sys/errno.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00107}00107 \textcolor{preprocessor}{\#include <sys/types.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00108}00108 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00109}00109 \textcolor{preprocessor}{\#include <sys/sbuf.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00110}00110 \textcolor{preprocessor}{\#include <assert.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00111}00111 \textcolor{preprocessor}{\#include <stdio.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00112}00112 \textcolor{preprocessor}{\#include <string.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00113}00113 \textcolor{preprocessor}{\#include <stddef.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00114}00114 \textcolor{preprocessor}{\#include <stdlib.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00115}00115 \textcolor{preprocessor}{\#include <stdarg.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00116}00116 \textcolor{preprocessor}{\#include <stdbool.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00117}00117 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00118}00118 \textcolor{preprocessor}{\#define bitcount64(x)   \_\_bitcount64((uint64\_t)(x))}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00119}00119 \textcolor{preprocessor}{\#define malloc(a,b,c)   calloc(a, 1)}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00120}00120 \textcolor{preprocessor}{\#define free(a,b)       free(a)}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00121}00121 \textcolor{preprocessor}{\#define ummin(a,b)      ((a) < (b) ? (a) : (b))}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00122}00122 \textcolor{preprocessor}{\#define imin(a,b)       ((a) < (b) ? (a) : (b))}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00123}00123 \textcolor{preprocessor}{\#define KASSERT(a,b)    assert(a)}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00124}00124 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00125}00125 \textcolor{preprocessor}{\#include <sys/blist.h>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00126}00126 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00127}00127 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00128}00128 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00129}00129 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00130}00130 \textcolor{comment}{ * static support functions}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00131}00131 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00132}00132 \textcolor{keyword}{static} daddr\_t  \mbox{\hyperlink{subr__blist_8c_a858d9cd71802889c80942f04368dedb7}{blst\_leaf\_alloc}}(blmeta\_t *scan, daddr\_t blk,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00133}00133     \textcolor{keywordtype}{int} *\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, \textcolor{keywordtype}{int} \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00134}00134 \textcolor{keyword}{static} daddr\_t  \mbox{\hyperlink{subr__blist_8c_a019d18bfc6d77dfff4f78799c88280c8}{blst\_meta\_alloc}}(blmeta\_t *scan, daddr\_t cursor, \textcolor{keywordtype}{int} *\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00135}00135     \textcolor{keywordtype}{int} \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}}, u\_daddr\_t radix);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00136}00136 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{subr__blist_8c_afff382593d21459df0b6d051413f51b0}{blst\_leaf\_free}}(blmeta\_t *scan, daddr\_t relblk, \textcolor{keywordtype}{int} \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00137}00137 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{subr__blist_8c_afd05c54e3d506a139f10a3eda0797f37}{blst\_meta\_free}}(blmeta\_t *scan, daddr\_t freeBlk, daddr\_t \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00138}00138                     u\_daddr\_t radix);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00139}00139 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{subr__blist_8c_ac7fce013f3c04060bc7a94bb66095abc}{blst\_copy}}(blmeta\_t *scan, daddr\_t blk, daddr\_t radix,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00140}00140                     blist\_t dest, daddr\_t \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00141}00141 \textcolor{keyword}{static} daddr\_t \mbox{\hyperlink{subr__blist_8c_a2b2fdd48a21b9b7c033b2da8b8848771}{blst\_leaf\_fill}}(blmeta\_t *scan, daddr\_t blk, \textcolor{keywordtype}{int} \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00142}00142 \textcolor{keyword}{static} daddr\_t \mbox{\hyperlink{subr__blist_8c_abaa44d6fd0c36c755754816b91349cda}{blst\_meta\_fill}}(blmeta\_t *scan, daddr\_t allocBlk, daddr\_t \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00143}00143                     u\_daddr\_t radix);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00144}00144 \textcolor{preprocessor}{\#ifndef \_KERNEL}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00145}00145 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     blst\_radix\_print(blmeta\_t *scan, daddr\_t blk, daddr\_t radix,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00146}00146                     \textcolor{keywordtype}{int} tab);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00147}00147 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00148}00148 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00149}00149 \textcolor{preprocessor}{\#ifdef \_KERNEL}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00150}\mbox{\hyperlink{subr__blist_8c_a29de9ec1fcb80d9a9cc51cb64a21178f}{00150}} \textcolor{keyword}{static} \mbox{\hyperlink{subr__blist_8c_a29de9ec1fcb80d9a9cc51cb64a21178f}{MALLOC\_DEFINE}}(M\_SWAP, \textcolor{stringliteral}{"{}SWAP"{}}, \textcolor{stringliteral}{"{}Swap space"{}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00151}00151 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00152}00152 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00153}\mbox{\hyperlink{subr__blist_8c_a9f5cd6fad634cdccff3bda0bba4409ef}{00153}} \textcolor{preprocessor}{\#define BLIST\_MASK      (BLIST\_RADIX -\/ 1)}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00154}00154 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00155}00155 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00156}00156 \textcolor{comment}{ * For a subtree that can represent the state of up to 'radix' blocks, the}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00157}00157 \textcolor{comment}{ * number of leaf nodes of the subtree is L=radix/BLIST\_RADIX.  If 'm'}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00158}00158 \textcolor{comment}{ * is short for BLIST\_RADIX, then for a tree of height h with L=m**h}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00159}00159 \textcolor{comment}{ * leaf nodes, the total number of tree nodes is 1 + m + m**2 + ... + m**h,}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00160}00160 \textcolor{comment}{ * or, equivalently, (m**(h+1)-\/1)/(m-\/1).  This quantity is called 'skip'}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00161}00161 \textcolor{comment}{ * in the 'meta' functions that process subtrees.  Since integer division}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00162}00162 \textcolor{comment}{ * discards remainders, we can express this computation as}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00163}00163 \textcolor{comment}{ * skip = (m * m**h) / (m -\/ 1)}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00164}00164 \textcolor{comment}{ * skip = (m * (radix / m)) / (m -\/ 1)}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00165}00165 \textcolor{comment}{ * skip = radix / (m -\/ 1)}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00166}00166 \textcolor{comment}{ * so that simple integer division by a constant can safely be used for the}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00167}00167 \textcolor{comment}{ * calculation.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00168}00168 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00169}00169 \textcolor{keyword}{static} \textcolor{keyword}{inline} daddr\_t}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00170}\mbox{\hyperlink{subr__blist_8c_af44e0ae4fbe868a189ddd0d930cf898c}{00170}} \mbox{\hyperlink{subr__blist_8c_af44e0ae4fbe868a189ddd0d930cf898c}{radix\_to\_skip}}(daddr\_t radix)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00171}00171 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00172}00172 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00173}00173         \textcolor{keywordflow}{return} (radix / \mbox{\hyperlink{subr__blist_8c_a9f5cd6fad634cdccff3bda0bba4409ef}{BLIST\_MASK}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00174}00174 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00175}00175 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00176}00176 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00177}00177 \textcolor{comment}{ * Provide a mask with count bits set, starting as position n.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00178}00178 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00179}00179 \textcolor{keyword}{static} \textcolor{keyword}{inline} u\_daddr\_t}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00180}\mbox{\hyperlink{subr__blist_8c_a8cfe20099bd8649e36f32d03d2860952}{00180}} \mbox{\hyperlink{subr__blist_8c_a8cfe20099bd8649e36f32d03d2860952}{bitrange}}(\textcolor{keywordtype}{int} n, \textcolor{keywordtype}{int} \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}})}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00181}00181 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00182}00182 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00183}00183         \textcolor{keywordflow}{return} (((u\_daddr\_t)-\/1 << n) \&}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00184}00184             ((u\_daddr\_t)-\/1 >> (BLIST\_RADIX -\/ (n + \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}))));}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00185}00185 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00186}00186 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00187}00187 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00188}00188 \textcolor{comment}{ * Find the first bit set in a u\_daddr\_t.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00189}00189 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00190}00190 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00191}\mbox{\hyperlink{subr__blist_8c_ae7d695d601406b1aa8642fdcadd790bc}{00191}} \mbox{\hyperlink{subr__blist_8c_ae7d695d601406b1aa8642fdcadd790bc}{generic\_bitpos}}(u\_daddr\_t \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}})}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00192}00192 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00193}00193         \textcolor{keywordtype}{int} hi, lo, mid;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00194}00194 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00195}00195         lo = 0;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00196}00196         hi = BLIST\_RADIX;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00197}00197         \textcolor{keywordflow}{while} (lo + 1 < hi) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00198}00198                 mid = (lo + hi) >> 1;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00199}00199                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} \& \mbox{\hyperlink{subr__blist_8c_a8cfe20099bd8649e36f32d03d2860952}{bitrange}}(0, mid))}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00200}00200                         hi = mid;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00201}00201                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00202}00202                         lo = mid;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00203}00203         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00204}00204         \textcolor{keywordflow}{return} (lo);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00205}00205 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00206}00206 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00207}00207 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00208}\mbox{\hyperlink{subr__blist_8c_a9d0e3fb6075efa4b306afdee927146b7}{00208}} \mbox{\hyperlink{subr__blist_8c_a9d0e3fb6075efa4b306afdee927146b7}{bitpos}}(u\_daddr\_t \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}})}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00209}00209 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00210}00210 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00211}00211         \textcolor{keywordflow}{switch} (\textcolor{keyword}{sizeof}(\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}})) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00212}00212 \textcolor{preprocessor}{\#ifdef HAVE\_INLINE\_FFSLL}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00213}00213         \textcolor{keywordflow}{case} \textcolor{keyword}{sizeof}(\textcolor{keywordtype}{long} long):}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00214}00214                 \textcolor{keywordflow}{return} (ffsll(\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}}) -\/ 1);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00215}00215 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00216}00216 \textcolor{preprocessor}{\#ifdef HAVE\_INLINE\_FFS}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00217}00217         \textcolor{keywordflow}{case} \textcolor{keyword}{sizeof}(int):}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00218}00218                 \textcolor{keywordflow}{return} (ffs(\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}}) -\/ 1);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00219}00219 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00220}00220         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00221}00221                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{subr__blist_8c_ae7d695d601406b1aa8642fdcadd790bc}{generic\_bitpos}}(\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}}));}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00222}00222         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00223}00223 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00224}00224 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00225}00225 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00226}00226 \textcolor{comment}{ * blist\_create() -\/ create a blist capable of handling up to the specified}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00227}00227 \textcolor{comment}{ *                  number of blocks}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00228}00228 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00229}00229 \textcolor{comment}{ *      blocks -\/ must be greater than 0}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00230}00230 \textcolor{comment}{ *      flags  -\/ malloc flags}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00231}00231 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00232}00232 \textcolor{comment}{ *      The smallest blist consists of a single leaf node capable of}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00233}00233 \textcolor{comment}{ *      managing BLIST\_RADIX blocks.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00234}00234 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00235}00235 blist\_t}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00236}\mbox{\hyperlink{subr__blist_8c_a835399d5962d134c68ff244375042bf1}{00236}} \mbox{\hyperlink{subr__blist_8c_a835399d5962d134c68ff244375042bf1}{blist\_create}}(daddr\_t blocks, \textcolor{keywordtype}{int} \mbox{\hyperlink{subr__stats_8c_a1e87af3c18a2fd36c61faf89949bdc3f}{flags}})}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00237}00237 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00238}00238         blist\_t bl;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00239}00239         u\_daddr\_t nodes, radix;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00240}00240 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00241}00241         KASSERT(blocks > 0, (\textcolor{stringliteral}{"{}invalid block count"{}}));}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00242}00242 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00243}00243         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00244}00244 \textcolor{comment}{         * Calculate the radix and node count used for scanning.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00245}00245 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00246}00246         nodes = 1;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00247}00247         \textcolor{keywordflow}{for} (radix = 1; (blocks -\/ 1) / BLIST\_RADIX / radix > 0;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00248}00248             radix *= BLIST\_RADIX)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00249}00249                 nodes += 1 + (blocks -\/ 1) / BLIST\_RADIX / radix;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00250}00250 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00251}00251         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00252}00252 \textcolor{comment}{         * Include a sentinel node to ensure that cross-\/leaf scans stay within}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00253}00253 \textcolor{comment}{         * the bounds of the allocation.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00254}00254 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00255}00255         \textcolor{keywordflow}{if} (blocks \% BLIST\_RADIX == 0)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00256}00256                 nodes++;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00257}00257 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00258}00258         bl = \mbox{\hyperlink{kern__malloc_8c_a13e924a88f20870d2d55e3f7fb660352}{malloc}}(offsetof(\textcolor{keyword}{struct} blist, bl\_root[nodes]), M\_SWAP, \mbox{\hyperlink{subr__stats_8c_a1e87af3c18a2fd36c61faf89949bdc3f}{flags}} |}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00259}00259             M\_ZERO);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00260}00260         \textcolor{keywordflow}{if} (bl == NULL)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00261}00261                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00262}00262 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00263}00263         bl-\/>bl\_blocks = blocks;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00264}00264         bl-\/>bl\_radix = radix;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00265}00265 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00266}00266 \textcolor{preprocessor}{\#if defined(BLIST\_DEBUG)}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00267}00267         \mbox{\hyperlink{subr__prf_8c_a55f3d956bb2ba20b5059e9e25484a47f}{printf}}(}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00268}00268                 \textcolor{stringliteral}{"{}BLIST representing \%lld blocks (\%lld MB of swap)"{}}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00269}00269                 \textcolor{stringliteral}{"{}, requiring \%lldK of ram\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00270}00270                 (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})bl-\/>bl\_blocks,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00271}00271                 (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})bl-\/>bl\_blocks * 4 / 1024,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00272}00272                 (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})(nodes * \textcolor{keyword}{sizeof}(blmeta\_t) + 1023) / 1024}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00273}00273         );}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00274}00274         \mbox{\hyperlink{subr__prf_8c_a55f3d956bb2ba20b5059e9e25484a47f}{printf}}(\textcolor{stringliteral}{"{}BLIST raw radix tree contains \%lld records\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00275}00275             (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})nodes);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00276}00276 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00277}00277 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00278}00278         \textcolor{keywordflow}{return} (bl);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00279}00279 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00280}00280 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00281}00281 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00282}\mbox{\hyperlink{subr__blist_8c_a8d0a6ecad7304abbb00399805136f864}{00282}} \mbox{\hyperlink{subr__blist_8c_a8d0a6ecad7304abbb00399805136f864}{blist\_destroy}}(blist\_t bl)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00283}00283 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00284}00284 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00285}00285         \mbox{\hyperlink{kern__malloc_8c_af6592f7dfb186f55f99e52892336fff0}{free}}(bl, M\_SWAP);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00286}00286 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00287}00287 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00288}00288 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00289}00289 \textcolor{comment}{ * blist\_alloc() -\/   reserve space in the block bitmap.  Return the base}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00290}00290 \textcolor{comment}{ *                   of a contiguous region or SWAPBLK\_NONE if space could}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00291}00291 \textcolor{comment}{ *                   not be allocated.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00292}00292 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00293}00293 daddr\_t}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00294}\mbox{\hyperlink{subr__blist_8c_a9ec406462791785fa4bd40285756c0cf}{00294}} \mbox{\hyperlink{subr__blist_8c_a9ec406462791785fa4bd40285756c0cf}{blist\_alloc}}(blist\_t bl, \textcolor{keywordtype}{int} *\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, \textcolor{keywordtype}{int} \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}})}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00295}00295 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00296}00296         daddr\_t blk, cursor;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00297}00297 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00298}00298         KASSERT(*\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}} <= \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00299}00299             (\textcolor{stringliteral}{"{}invalid parameters \%d > \%d"{}}, *\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}}));}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00300}00300         KASSERT(*\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}} <= BLIST\_MAX\_ALLOC,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00301}00301             (\textcolor{stringliteral}{"{}minimum allocation too large: \%d"{}}, *\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}));}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00302}00302 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00303}00303         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00304}00304 \textcolor{comment}{         * This loop iterates at most twice.  An allocation failure in the}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00305}00305 \textcolor{comment}{         * first iteration leads to a second iteration only if the cursor was}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00306}00306 \textcolor{comment}{         * non-\/zero.  When the cursor is zero, an allocation failure will}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00307}00307 \textcolor{comment}{         * stop further iterations.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00308}00308 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00309}00309         \textcolor{keywordflow}{for} (cursor = bl-\/>bl\_cursor;; cursor = 0) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00310}00310                 blk = \mbox{\hyperlink{subr__blist_8c_a019d18bfc6d77dfff4f78799c88280c8}{blst\_meta\_alloc}}(bl-\/>bl\_root, cursor, \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00311}00311                     bl-\/>bl\_radix);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00312}00312                 \textcolor{keywordflow}{if} (blk != SWAPBLK\_NONE) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00313}00313                         bl-\/>bl\_avail -\/= *\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00314}00314                         bl-\/>bl\_cursor = blk + *\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00315}00315                         \textcolor{keywordflow}{if} (bl-\/>bl\_cursor == bl-\/>bl\_blocks)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00316}00316                                 bl-\/>bl\_cursor = 0;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00317}00317                         \textcolor{keywordflow}{return} (blk);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00318}00318                 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00319}00319                 \textcolor{keywordflow}{if} (cursor == 0)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00320}00320                         \textcolor{keywordflow}{return} (SWAPBLK\_NONE);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00321}00321         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00322}00322 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00323}00323 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00324}00324 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00325}00325 \textcolor{comment}{ * blist\_avail() -\/      return the number of free blocks.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00326}00326 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00327}00327 daddr\_t}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00328}\mbox{\hyperlink{subr__blist_8c_a5993e45314f74b0ccc5e927415158f62}{00328}} \mbox{\hyperlink{subr__blist_8c_a5993e45314f74b0ccc5e927415158f62}{blist\_avail}}(blist\_t bl)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00329}00329 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00330}00330 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00331}00331         \textcolor{keywordflow}{return} (bl-\/>bl\_avail);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00332}00332 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00333}00333 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00334}00334 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00335}00335 \textcolor{comment}{ * blist\_free() -\/       free up space in the block bitmap.  Return the base}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00336}00336 \textcolor{comment}{ *                      of a contiguous region.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00337}00337 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00338}00338 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00339}\mbox{\hyperlink{subr__blist_8c_ac55e4677f8a94a1fdbc278e48697478f}{00339}} \mbox{\hyperlink{subr__blist_8c_ac55e4677f8a94a1fdbc278e48697478f}{blist\_free}}(blist\_t bl, daddr\_t blkno, daddr\_t \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}})}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00340}00340 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00341}00341 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00342}00342         KASSERT(blkno >= 0 \&\& blkno + count <= bl-\/>bl\_blocks,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00343}00343             (\textcolor{stringliteral}{"{}freeing invalid range: blkno \%jx, count \%d, blocks \%jd"{}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00344}00344             (uintmax\_t)blkno, (\textcolor{keywordtype}{int})\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, (uintmax\_t)bl-\/>bl\_blocks));}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00345}00345         \mbox{\hyperlink{subr__blist_8c_afd05c54e3d506a139f10a3eda0797f37}{blst\_meta\_free}}(bl-\/>bl\_root, blkno, \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, bl-\/>bl\_radix);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00346}00346         bl-\/>bl\_avail += \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00347}00347 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00348}00348 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00349}00349 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00350}00350 \textcolor{comment}{ * blist\_fill() -\/       mark a region in the block bitmap as off-\/limits}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00351}00351 \textcolor{comment}{ *                      to the allocator (i.e. allocate it), ignoring any}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00352}00352 \textcolor{comment}{ *                      existing allocations.  Return the number of blocks}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00353}00353 \textcolor{comment}{ *                      actually filled that were free before the call.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00354}00354 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00355}00355 daddr\_t}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00356}\mbox{\hyperlink{subr__blist_8c_aa2974205d4ef6dfa4d290325886eadde}{00356}} \mbox{\hyperlink{subr__blist_8c_aa2974205d4ef6dfa4d290325886eadde}{blist\_fill}}(blist\_t bl, daddr\_t blkno, daddr\_t \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}})}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00357}00357 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00358}00358         daddr\_t filled;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00359}00359 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00360}00360         KASSERT(blkno >= 0 \&\& blkno + count <= bl-\/>bl\_blocks,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00361}00361             (\textcolor{stringliteral}{"{}filling invalid range: blkno \%jx, count \%d, blocks \%jd"{}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00362}00362             (uintmax\_t)blkno, (\textcolor{keywordtype}{int})\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, (uintmax\_t)bl-\/>bl\_blocks));}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00363}00363         filled = \mbox{\hyperlink{subr__blist_8c_abaa44d6fd0c36c755754816b91349cda}{blst\_meta\_fill}}(bl-\/>bl\_root, blkno, \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, bl-\/>bl\_radix);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00364}00364         bl-\/>bl\_avail -\/= filled;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00365}00365         \textcolor{keywordflow}{return} (filled);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00366}00366 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00367}00367 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00368}00368 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00369}00369 \textcolor{comment}{ * blist\_resize() -\/     resize an existing radix tree to handle the}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00370}00370 \textcolor{comment}{ *                      specified number of blocks.  This will reallocate}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00371}00371 \textcolor{comment}{ *                      the tree and transfer the previous bitmap to the new}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00372}00372 \textcolor{comment}{ *                      one.  When extending the tree you can specify whether}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00373}00373 \textcolor{comment}{ *                      the new blocks are to left allocated or freed.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00374}00374 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00375}00375 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00376}\mbox{\hyperlink{subr__blist_8c_aa05d0abb3e68eaf54bcc48cf56d955fa}{00376}} \mbox{\hyperlink{subr__blist_8c_aa05d0abb3e68eaf54bcc48cf56d955fa}{blist\_resize}}(blist\_t *pbl, daddr\_t \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, \textcolor{keywordtype}{int} freenew, \textcolor{keywordtype}{int} \mbox{\hyperlink{subr__stats_8c_a1e87af3c18a2fd36c61faf89949bdc3f}{flags}})}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00377}00377 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00378}00378     blist\_t newbl = \mbox{\hyperlink{subr__blist_8c_a835399d5962d134c68ff244375042bf1}{blist\_create}}(\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, \mbox{\hyperlink{subr__stats_8c_a1e87af3c18a2fd36c61faf89949bdc3f}{flags}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00379}00379     blist\_t save = *pbl;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00380}00380 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00381}00381     *pbl = newbl;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00382}00382     \textcolor{keywordflow}{if} (\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}} > save-\/>bl\_blocks)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00383}00383             \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}} = save-\/>bl\_blocks;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00384}00384     \mbox{\hyperlink{subr__blist_8c_ac7fce013f3c04060bc7a94bb66095abc}{blst\_copy}}(save-\/>bl\_root, 0, save-\/>bl\_radix, newbl, \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00385}00385 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00386}00386     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00387}00387 \textcolor{comment}{     * If resizing upwards, should we free the new space or not?}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00388}00388 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00389}00389     \textcolor{keywordflow}{if} (freenew \&\& count < newbl-\/>bl\_blocks) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00390}00390             \mbox{\hyperlink{subr__blist_8c_ac55e4677f8a94a1fdbc278e48697478f}{blist\_free}}(newbl, \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, newbl-\/>bl\_blocks -\/ \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00391}00391     \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00392}00392     \mbox{\hyperlink{subr__blist_8c_a8d0a6ecad7304abbb00399805136f864}{blist\_destroy}}(save);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00393}00393 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00394}00394 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00395}00395 \textcolor{preprocessor}{\#ifdef BLIST\_DEBUG}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00396}00396 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00397}00397 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00398}00398 \textcolor{comment}{ * blist\_print()    -\/ dump radix tree}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00399}00399 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00400}00400 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00401}00401 blist\_print(blist\_t bl)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00402}00402 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00403}00403         \mbox{\hyperlink{subr__prf_8c_a55f3d956bb2ba20b5059e9e25484a47f}{printf}}(\textcolor{stringliteral}{"{}BLIST avail = \%jd, cursor = \%08jx \{\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00404}00404             (uintmax\_t)bl-\/>bl\_avail, (uintmax\_t)bl-\/>bl\_cursor);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00405}00405 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00406}00406         \textcolor{keywordflow}{if} (bl-\/>bl\_root-\/>bm\_bitmap != 0)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00407}00407                 blst\_radix\_print(bl-\/>bl\_root, 0, bl-\/>bl\_radix, 4);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00408}00408         \mbox{\hyperlink{subr__prf_8c_a55f3d956bb2ba20b5059e9e25484a47f}{printf}}(\textcolor{stringliteral}{"{}\}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00409}00409 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00410}00410 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00411}00411 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00412}00412 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00413}\mbox{\hyperlink{subr__blist_8c_ac5a5b1e602c92d112654dfbd8655c762}{00413}} \textcolor{keyword}{static} \textcolor{keyword}{const} u\_daddr\_t \mbox{\hyperlink{subr__blist_8c_ac5a5b1e602c92d112654dfbd8655c762}{fib}}[] = \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00414}00414         1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00415}00415         4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00416}00416         514229, 832040, 1346269, 2178309, 3524578,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00417}00417 \};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00418}00418 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00419}00419 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00420}00420 \textcolor{comment}{ * Use 'gap' to describe a maximal range of unallocated blocks/bits.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00421}00421 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00422}\mbox{\hyperlink{structgap__stats}{00422}} \textcolor{keyword}{struct }\mbox{\hyperlink{structgap__stats}{gap\_stats}} \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00423}\mbox{\hyperlink{structgap__stats_a9c2e2a0c67cb12b0d1e1a7e0db8224b4}{00423}}         daddr\_t \mbox{\hyperlink{structgap__stats_a9c2e2a0c67cb12b0d1e1a7e0db8224b4}{start}};             \textcolor{comment}{/* current gap start, or SWAPBLK\_NONE */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00424}\mbox{\hyperlink{structgap__stats_a5eb02fee884b44c889c40865ab83a3cf}{00424}}         daddr\_t \mbox{\hyperlink{structgap__stats_a5eb02fee884b44c889c40865ab83a3cf}{num}};         \textcolor{comment}{/* number of gaps observed */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00425}\mbox{\hyperlink{structgap__stats_a4b457644f6694d735f4846ea786731ba}{00425}}         daddr\_t \mbox{\hyperlink{structgap__stats_a4b457644f6694d735f4846ea786731ba}{max}};         \textcolor{comment}{/* largest gap size */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00426}\mbox{\hyperlink{structgap__stats_a5bc4fcffd75b9306e9502e5605bcf9d3}{00426}}         daddr\_t \mbox{\hyperlink{structgap__stats_a5bc4fcffd75b9306e9502e5605bcf9d3}{avg}};         \textcolor{comment}{/* average gap size */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00427}\mbox{\hyperlink{structgap__stats_adac7717ee6e66f67895ff7cf1139d271}{00427}}         daddr\_t \mbox{\hyperlink{structgap__stats_adac7717ee6e66f67895ff7cf1139d271}{err}};         \textcolor{comment}{/* sum -\/ num * avg */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00428}\mbox{\hyperlink{structgap__stats_ad01005c33677d18ae7d099929fdc16d3}{00428}}         daddr\_t \mbox{\hyperlink{structgap__stats_ad01005c33677d18ae7d099929fdc16d3}{histo}}[nitems(\mbox{\hyperlink{subr__blist_8c_ac5a5b1e602c92d112654dfbd8655c762}{fib}})]; \textcolor{comment}{/* \# gaps in each size range */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00429}\mbox{\hyperlink{structgap__stats_a6f360806b31af24ccd680ff2c1f1e3a8}{00429}}         \textcolor{keywordtype}{int}     \mbox{\hyperlink{structgap__stats_a6f360806b31af24ccd680ff2c1f1e3a8}{max\_bucket}};   \textcolor{comment}{/* last histo elt with nonzero val */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00430}00430 \};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00431}00431 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00432}00432 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00433}00433 \textcolor{comment}{ * gap\_stats\_counting()    -\/ is the state 'counting 1 bits'?}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00434}00434 \textcolor{comment}{ *                           or 'skipping 0 bits'?}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00435}00435 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00436}00436 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{bool}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00437}\mbox{\hyperlink{subr__blist_8c_a6f31f9ac76fa4713f093b1c2ecc00ff7}{00437}} \mbox{\hyperlink{subr__blist_8c_a6f31f9ac76fa4713f093b1c2ecc00ff7}{gap\_stats\_counting}}(\textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structgap__stats}{gap\_stats}} *stats)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00438}00438 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00439}00439 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00440}00440         \textcolor{keywordflow}{return} (stats-\/>\mbox{\hyperlink{structgap__stats_a9c2e2a0c67cb12b0d1e1a7e0db8224b4}{start}} != SWAPBLK\_NONE);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00441}00441 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00442}00442 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00443}00443 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00444}00444 \textcolor{comment}{ * init\_gap\_stats()    -\/ initialize stats on gap sizes}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00445}00445 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00446}00446 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00447}\mbox{\hyperlink{subr__blist_8c_a1cf15edd8898a386e15a8b82607368c3}{00447}} \mbox{\hyperlink{subr__blist_8c_a1cf15edd8898a386e15a8b82607368c3}{init\_gap\_stats}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgap__stats}{gap\_stats}} *stats)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00448}00448 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00449}00449 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00450}00450         bzero(stats, \textcolor{keyword}{sizeof}(*stats));}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00451}00451         stats-\/>\mbox{\hyperlink{structgap__stats_a9c2e2a0c67cb12b0d1e1a7e0db8224b4}{start}} = SWAPBLK\_NONE;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00452}00452 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00453}00453 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00454}00454 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00455}00455 \textcolor{comment}{ * update\_gap\_stats()    -\/ update stats on gap sizes}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00456}00456 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00457}00457 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00458}\mbox{\hyperlink{subr__blist_8c_aafe81e29552d3a497f5c90b0f0e81287}{00458}} \mbox{\hyperlink{subr__blist_8c_aafe81e29552d3a497f5c90b0f0e81287}{update\_gap\_stats}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgap__stats}{gap\_stats}} *stats, daddr\_t posn)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00459}00459 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00460}00460         daddr\_t size;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00461}00461         \textcolor{keywordtype}{int} hi, lo, mid;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00462}00462 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00463}00463         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{subr__blist_8c_a6f31f9ac76fa4713f093b1c2ecc00ff7}{gap\_stats\_counting}}(stats)) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00464}00464                 stats-\/>\mbox{\hyperlink{structgap__stats_a9c2e2a0c67cb12b0d1e1a7e0db8224b4}{start}} = posn;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00465}00465                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00466}00466         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00467}00467         size = posn -\/ stats-\/>\mbox{\hyperlink{structgap__stats_a9c2e2a0c67cb12b0d1e1a7e0db8224b4}{start}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00468}00468         stats-\/>\mbox{\hyperlink{structgap__stats_a9c2e2a0c67cb12b0d1e1a7e0db8224b4}{start}} = SWAPBLK\_NONE;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00469}00469         \textcolor{keywordflow}{if} (size > stats-\/>\mbox{\hyperlink{structgap__stats_a4b457644f6694d735f4846ea786731ba}{max}})}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00470}00470                 stats-\/>\mbox{\hyperlink{structgap__stats_a4b457644f6694d735f4846ea786731ba}{max}} = size;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00471}00471 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00472}00472         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00473}00473 \textcolor{comment}{         * Find the fibonacci range that contains size,}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00474}00474 \textcolor{comment}{         * expecting to find it in an early range.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00475}00475 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00476}00476         lo = 0;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00477}00477         hi = 1;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00478}00478         \textcolor{keywordflow}{while} (hi < nitems(\mbox{\hyperlink{subr__blist_8c_ac5a5b1e602c92d112654dfbd8655c762}{fib}}) \&\& \mbox{\hyperlink{subr__blist_8c_ac5a5b1e602c92d112654dfbd8655c762}{fib}}[hi] <= size) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00479}00479                 lo = hi;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00480}00480                 hi *= 2;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00481}00481         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00482}00482         \textcolor{keywordflow}{if} (hi >= nitems(\mbox{\hyperlink{subr__blist_8c_ac5a5b1e602c92d112654dfbd8655c762}{fib}}))}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00483}00483                 hi = nitems(\mbox{\hyperlink{subr__blist_8c_ac5a5b1e602c92d112654dfbd8655c762}{fib}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00484}00484         \textcolor{keywordflow}{while} (lo + 1 != hi) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00485}00485                 mid = (lo + hi) >> 1;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00486}00486                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{subr__blist_8c_ac5a5b1e602c92d112654dfbd8655c762}{fib}}[mid] <= size)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00487}00487                         lo = mid;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00488}00488                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00489}00489                         hi = mid;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00490}00490         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00491}00491         stats-\/>\mbox{\hyperlink{structgap__stats_ad01005c33677d18ae7d099929fdc16d3}{histo}}[lo]++;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00492}00492         \textcolor{keywordflow}{if} (lo > stats-\/>\mbox{\hyperlink{structgap__stats_a6f360806b31af24ccd680ff2c1f1e3a8}{max\_bucket}})}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00493}00493                 stats-\/>\mbox{\hyperlink{structgap__stats_a6f360806b31af24ccd680ff2c1f1e3a8}{max\_bucket}} = lo;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00494}00494         stats-\/>\mbox{\hyperlink{structgap__stats_adac7717ee6e66f67895ff7cf1139d271}{err}} += size -\/ stats-\/>\mbox{\hyperlink{structgap__stats_a5bc4fcffd75b9306e9502e5605bcf9d3}{avg}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00495}00495         stats-\/>\mbox{\hyperlink{structgap__stats_a5eb02fee884b44c889c40865ab83a3cf}{num}}++;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00496}00496         stats-\/>\mbox{\hyperlink{structgap__stats_a5bc4fcffd75b9306e9502e5605bcf9d3}{avg}} += stats-\/>\mbox{\hyperlink{structgap__stats_adac7717ee6e66f67895ff7cf1139d271}{err}} / stats-\/>\mbox{\hyperlink{structgap__stats_a5eb02fee884b44c889c40865ab83a3cf}{num}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00497}00497         stats-\/>\mbox{\hyperlink{structgap__stats_adac7717ee6e66f67895ff7cf1139d271}{err}} \%= stats-\/>\mbox{\hyperlink{structgap__stats_a5eb02fee884b44c889c40865ab83a3cf}{num}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00498}00498 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00499}00499 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00500}00500 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00501}00501 \textcolor{comment}{ * dump\_gap\_stats()    -\/ print stats on gap sizes}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00502}00502 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00503}00503 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00504}\mbox{\hyperlink{subr__blist_8c_a59e92dfb2d78916a294345099ef61bce}{00504}} \mbox{\hyperlink{subr__blist_8c_a59e92dfb2d78916a294345099ef61bce}{dump\_gap\_stats}}(\textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structgap__stats}{gap\_stats}} *stats, \textcolor{keyword}{struct} sbuf *s)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00505}00505 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00506}00506         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00507}00507 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00508}00508         \mbox{\hyperlink{subr__sbuf_8c_a6c6abdb7c0c9a19d892b1d07757dd056}{sbuf\_printf}}(s, \textcolor{stringliteral}{"{}number of maximal free ranges: \%jd\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00509}00509             (intmax\_t)stats-\/>\mbox{\hyperlink{structgap__stats_a5eb02fee884b44c889c40865ab83a3cf}{num}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00510}00510         \mbox{\hyperlink{subr__sbuf_8c_a6c6abdb7c0c9a19d892b1d07757dd056}{sbuf\_printf}}(s, \textcolor{stringliteral}{"{}largest free range: \%jd\(\backslash\)n"{}}, (intmax\_t)stats-\/>\mbox{\hyperlink{structgap__stats_a4b457644f6694d735f4846ea786731ba}{max}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00511}00511         \mbox{\hyperlink{subr__sbuf_8c_a6c6abdb7c0c9a19d892b1d07757dd056}{sbuf\_printf}}(s, \textcolor{stringliteral}{"{}average maximal free range size: \%jd\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00512}00512             (intmax\_t)stats-\/>\mbox{\hyperlink{structgap__stats_a5bc4fcffd75b9306e9502e5605bcf9d3}{avg}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00513}00513         \mbox{\hyperlink{subr__sbuf_8c_a6c6abdb7c0c9a19d892b1d07757dd056}{sbuf\_printf}}(s, \textcolor{stringliteral}{"{}number of maximal free ranges of different sizes:\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00514}00514         \mbox{\hyperlink{subr__sbuf_8c_a6c6abdb7c0c9a19d892b1d07757dd056}{sbuf\_printf}}(s, \textcolor{stringliteral}{"{}               count  |  size range\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00515}00515         \mbox{\hyperlink{subr__sbuf_8c_a6c6abdb7c0c9a19d892b1d07757dd056}{sbuf\_printf}}(s, \textcolor{stringliteral}{"{}               -\/-\/-\/-\/-\/  |  -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00516}00516         \textcolor{keywordflow}{for} (i = 0; i < stats-\/>\mbox{\hyperlink{structgap__stats_a6f360806b31af24ccd680ff2c1f1e3a8}{max\_bucket}}; i++) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00517}00517                 \textcolor{keywordflow}{if} (stats-\/>\mbox{\hyperlink{structgap__stats_ad01005c33677d18ae7d099929fdc16d3}{histo}}[i] != 0) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00518}00518                         \mbox{\hyperlink{subr__sbuf_8c_a6c6abdb7c0c9a19d892b1d07757dd056}{sbuf\_printf}}(s, \textcolor{stringliteral}{"{}\%20jd  |  "{}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00519}00519                             (intmax\_t)stats-\/>\mbox{\hyperlink{structgap__stats_ad01005c33677d18ae7d099929fdc16d3}{histo}}[i]);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00520}00520                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{subr__blist_8c_ac5a5b1e602c92d112654dfbd8655c762}{fib}}[i] != \mbox{\hyperlink{subr__blist_8c_ac5a5b1e602c92d112654dfbd8655c762}{fib}}[i + 1] -\/ 1)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00521}00521                                 \mbox{\hyperlink{subr__sbuf_8c_a6c6abdb7c0c9a19d892b1d07757dd056}{sbuf\_printf}}(s, \textcolor{stringliteral}{"{}\%jd to \%jd\(\backslash\)n"{}}, (intmax\_t)\mbox{\hyperlink{subr__blist_8c_ac5a5b1e602c92d112654dfbd8655c762}{fib}}[i],}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00522}00522                                     (intmax\_t)\mbox{\hyperlink{subr__blist_8c_ac5a5b1e602c92d112654dfbd8655c762}{fib}}[i + 1] -\/ 1);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00523}00523                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00524}00524                                 \mbox{\hyperlink{subr__sbuf_8c_a6c6abdb7c0c9a19d892b1d07757dd056}{sbuf\_printf}}(s, \textcolor{stringliteral}{"{}\%jd\(\backslash\)n"{}}, (intmax\_t)\mbox{\hyperlink{subr__blist_8c_ac5a5b1e602c92d112654dfbd8655c762}{fib}}[i]);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00525}00525                 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00526}00526         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00527}00527         \mbox{\hyperlink{subr__sbuf_8c_a6c6abdb7c0c9a19d892b1d07757dd056}{sbuf\_printf}}(s, \textcolor{stringliteral}{"{}\%20jd  |  "{}}, (intmax\_t)stats-\/>\mbox{\hyperlink{structgap__stats_ad01005c33677d18ae7d099929fdc16d3}{histo}}[i]);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00528}00528         \textcolor{keywordflow}{if} (stats-\/>\mbox{\hyperlink{structgap__stats_ad01005c33677d18ae7d099929fdc16d3}{histo}}[i] > 1)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00529}00529                 \mbox{\hyperlink{subr__sbuf_8c_a6c6abdb7c0c9a19d892b1d07757dd056}{sbuf\_printf}}(s, \textcolor{stringliteral}{"{}\%jd to \%jd\(\backslash\)n"{}}, (intmax\_t)\mbox{\hyperlink{subr__blist_8c_ac5a5b1e602c92d112654dfbd8655c762}{fib}}[i],}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00530}00530                     (intmax\_t)stats-\/>\mbox{\hyperlink{structgap__stats_a4b457644f6694d735f4846ea786731ba}{max}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00531}00531         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00532}00532                 \mbox{\hyperlink{subr__sbuf_8c_a6c6abdb7c0c9a19d892b1d07757dd056}{sbuf\_printf}}(s, \textcolor{stringliteral}{"{}\%jd\(\backslash\)n"{}}, (intmax\_t)stats-\/>\mbox{\hyperlink{structgap__stats_a4b457644f6694d735f4846ea786731ba}{max}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00533}00533 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00534}00534 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00535}00535 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00536}00536 \textcolor{comment}{ * blist\_stats()    -\/ dump radix tree stats}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00537}00537 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00538}00538 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00539}\mbox{\hyperlink{subr__blist_8c_abd2b9996f488b203a0ea847b4eb25bfa}{00539}} \mbox{\hyperlink{subr__blist_8c_abd2b9996f488b203a0ea847b4eb25bfa}{blist\_stats}}(blist\_t bl, \textcolor{keyword}{struct} sbuf *s)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00540}00540 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00541}00541         \textcolor{keyword}{struct }\mbox{\hyperlink{structgap__stats}{gap\_stats}} gstats;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00542}00542         \textcolor{keyword}{struct }\mbox{\hyperlink{structgap__stats}{gap\_stats}} *stats = \&gstats;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00543}00543         daddr\_t i, nodes, radix;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00544}00544         u\_daddr\_t diff, \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00545}00545         \textcolor{keywordtype}{int} digit;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00546}00546 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00547}00547         \mbox{\hyperlink{subr__blist_8c_a1cf15edd8898a386e15a8b82607368c3}{init\_gap\_stats}}(stats);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00548}00548         nodes = 0;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00549}00549         radix = bl-\/>bl\_radix;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00550}00550         \textcolor{keywordflow}{for} (i = 0; i < bl-\/>bl\_blocks; ) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00551}00551                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00552}00552 \textcolor{comment}{                 * Check for skippable subtrees starting at i.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00553}00553 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00554}00554                 \textcolor{keywordflow}{while} (radix != 1) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00555}00555                         \textcolor{keywordflow}{if} (bl-\/>bl\_root[nodes].bm\_bitmap == 0) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00556}00556                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{subr__blist_8c_a6f31f9ac76fa4713f093b1c2ecc00ff7}{gap\_stats\_counting}}(stats))}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00557}00557                                         \mbox{\hyperlink{subr__blist_8c_aafe81e29552d3a497f5c90b0f0e81287}{update\_gap\_stats}}(stats, i);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00558}00558                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00559}00559                         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00560}00560 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00561}00561                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00562}00562 \textcolor{comment}{                         * Skip subtree root.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00563}00563 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00564}00564                         nodes++;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00565}00565                         radix /= BLIST\_RADIX;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00566}00566                 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00567}00567                 \textcolor{keywordflow}{if} (radix == 1) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00568}00568                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00569}00569 \textcolor{comment}{                         * Scan leaf.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00570}00570 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00571}00571                         \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} = bl-\/>bl\_root[nodes].bm\_bitmap;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00572}00572                         diff = \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} \string^ (\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} << 1);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00573}00573                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{subr__blist_8c_a6f31f9ac76fa4713f093b1c2ecc00ff7}{gap\_stats\_counting}}(stats))}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00574}00574                                 diff \string^= 1;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00575}00575                         \textcolor{keywordflow}{while} (diff != 0) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00576}00576                                 digit = \mbox{\hyperlink{subr__blist_8c_a9d0e3fb6075efa4b306afdee927146b7}{bitpos}}(diff);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00577}00577                                 \mbox{\hyperlink{subr__blist_8c_aafe81e29552d3a497f5c90b0f0e81287}{update\_gap\_stats}}(stats, i + digit);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00578}00578                                 diff \string^= \mbox{\hyperlink{subr__blist_8c_a8cfe20099bd8649e36f32d03d2860952}{bitrange}}(digit, 1);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00579}00579                         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00580}00580                 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00581}00581                 nodes += \mbox{\hyperlink{subr__blist_8c_af44e0ae4fbe868a189ddd0d930cf898c}{radix\_to\_skip}}(radix * BLIST\_RADIX);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00582}00582                 i += radix * BLIST\_RADIX;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00583}00583 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00584}00584                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00585}00585 \textcolor{comment}{                 * Find max size subtree starting at i.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00586}00586 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00587}00587                 \textcolor{keywordflow}{for} (radix = 1; }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00588}00588                     ((i / BLIST\_RADIX / radix) \& \mbox{\hyperlink{subr__blist_8c_a9f5cd6fad634cdccff3bda0bba4409ef}{BLIST\_MASK}}) == 0;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00589}00589                     radix *= BLIST\_RADIX)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00590}00590                         ;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00591}00591         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00592}00592         \mbox{\hyperlink{subr__blist_8c_aafe81e29552d3a497f5c90b0f0e81287}{update\_gap\_stats}}(stats, i);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00593}00593         \mbox{\hyperlink{subr__blist_8c_a59e92dfb2d78916a294345099ef61bce}{dump\_gap\_stats}}(stats, s);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00594}00594 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00595}00595 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00596}00596 \textcolor{comment}{/************************************************************************}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00597}00597 \textcolor{comment}{ *                        ALLOCATION SUPPORT FUNCTIONS                  *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00598}00598 \textcolor{comment}{ ************************************************************************}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00599}00599 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00600}00600 \textcolor{comment}{ *      These support functions do all the actual work.  They may seem}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00601}00601 \textcolor{comment}{ *      rather longish, but that's because I've commented them up.  The}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00602}00602 \textcolor{comment}{ *      actual code is straight forward.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00603}00603 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00604}00604 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00605}00605 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00606}00606 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00607}00607 \textcolor{comment}{ * BLST\_NEXT\_LEAF\_ALLOC() -\/ allocate the blocks starting with the next leaf.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00608}00608 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00609}00609 \textcolor{comment}{ *      'scan' is a leaf node, and its first block is at address 'start'.  The}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00610}00610 \textcolor{comment}{ *      next leaf node could be adjacent, or several nodes away if the least}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00611}00611 \textcolor{comment}{ *      common ancestor of 'scan' and its neighbor is several levels up.  Use}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00612}00612 \textcolor{comment}{ *      addresses to determine how many meta-\/nodes lie between the leaves.  If}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00613}00613 \textcolor{comment}{ *      sequence of leaves starting with the next one has enough initial bits}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00614}00614 \textcolor{comment}{ *      set, clear them and clear the bits in the meta nodes on the path up to}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00615}00615 \textcolor{comment}{ *      the least common ancestor to mark any subtrees made completely empty.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00616}00616 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00617}00617 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00618}\mbox{\hyperlink{subr__blist_8c_a536f57c0b32199545b5ac84e285a343a}{00618}} \mbox{\hyperlink{subr__blist_8c_a536f57c0b32199545b5ac84e285a343a}{blst\_next\_leaf\_alloc}}(blmeta\_t *scan, daddr\_t \mbox{\hyperlink{linker__if_8m_a9f8ed6df20d1d777399fd4f0f7f5a719}{start}}, \textcolor{keywordtype}{int} \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, \textcolor{keywordtype}{int} \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}})}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00619}00619 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00620}00620         u\_daddr\_t radix;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00621}00621         daddr\_t blk;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00622}00622         \textcolor{keywordtype}{int} avail, digit;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00623}00623 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00624}00624         \mbox{\hyperlink{linker__if_8m_a9f8ed6df20d1d777399fd4f0f7f5a719}{start}} += BLIST\_RADIX;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00625}00625         \textcolor{keywordflow}{for} (blk = \mbox{\hyperlink{linker__if_8m_a9f8ed6df20d1d777399fd4f0f7f5a719}{start}}; blk -\/ \mbox{\hyperlink{linker__if_8m_a9f8ed6df20d1d777399fd4f0f7f5a719}{start}} < \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}}; blk += BLIST\_RADIX) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00626}00626                 \textcolor{comment}{/* Skip meta-\/nodes, as long as they promise more free blocks. */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00627}00627                 radix = BLIST\_RADIX;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00628}00628                 \textcolor{keywordflow}{while} (((++scan)-\/>bm\_bitmap \& 1) == 1 \&\&}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00629}00629                     ((blk / radix) \& \mbox{\hyperlink{subr__blist_8c_a9f5cd6fad634cdccff3bda0bba4409ef}{BLIST\_MASK}}) == 0)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00630}00630                         radix *= BLIST\_RADIX;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00631}00631                 \textcolor{keywordflow}{if} (\string~scan-\/>bm\_bitmap != 0) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00632}00632                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00633}00633 \textcolor{comment}{                         * Either there is no next leaf with any free blocks,}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00634}00634 \textcolor{comment}{                         * or we've reached the next leaf and found that some}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00635}00635 \textcolor{comment}{                         * of its blocks are not free.  In the first case,}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00636}00636 \textcolor{comment}{                         * bitpos() returns zero here.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00637}00637 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00638}00638                         avail = blk -\/ \mbox{\hyperlink{linker__if_8m_a9f8ed6df20d1d777399fd4f0f7f5a719}{start}} + \mbox{\hyperlink{subr__blist_8c_a9d0e3fb6075efa4b306afdee927146b7}{bitpos}}(\string~scan-\/>bm\_bitmap);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00639}00639                         \textcolor{keywordflow}{if} (avail < \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}} || avail == 0) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00640}00640                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00641}00641 \textcolor{comment}{                                 * There isn't a next leaf with enough free}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00642}00642 \textcolor{comment}{                                 * blocks at its beginning to bother}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00643}00643 \textcolor{comment}{                                 * allocating.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00644}00644 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00645}00645                                 \textcolor{keywordflow}{return} (avail);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00646}00646                         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00647}00647                         \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}} = imin(avail, \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00648}00648                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}} \% BLIST\_RADIX == 0) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00649}00649                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00650}00650 \textcolor{comment}{                                 * There was no next leaf.  Back scan up to}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00651}00651 \textcolor{comment}{                                 * last leaf.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00652}00652 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00653}00653                                 \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00654}00654                                         radix /= BLIST\_RADIX;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00655}00655                                         -\/-\/scan;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00656}00656                                 \} \textcolor{keywordflow}{while} (radix != 1);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00657}00657                                 blk -\/= BLIST\_RADIX;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00658}00658                         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00659}00659                 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00660}00660         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00661}00661 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00662}00662         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00663}00663 \textcolor{comment}{         * 'scan' is the last leaf that provides blocks.  Clear from 1 to}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00664}00664 \textcolor{comment}{         * BLIST\_RADIX bits to represent the allocation of those last blocks.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00665}00665 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00666}00666         \textcolor{keywordflow}{if} (\mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}} \% BLIST\_RADIX != 0)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00667}00667                 scan-\/>bm\_bitmap \&= \string~bitrange(0, \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}} \% BLIST\_RADIX);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00668}00668         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00669}00669                 scan-\/>bm\_bitmap = 0;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00670}00670 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00671}00671         \textcolor{keywordflow}{for} (;;) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00672}00672                 \textcolor{comment}{/* Back up over meta-\/nodes, clearing bits if necessary. */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00673}00673                 blk -\/= BLIST\_RADIX;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00674}00674                 \textcolor{keywordflow}{for} (radix = BLIST\_RADIX;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00675}00675                     (digit = ((blk / radix) \& \mbox{\hyperlink{subr__blist_8c_a9f5cd6fad634cdccff3bda0bba4409ef}{BLIST\_MASK}})) == 0;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00676}00676                     radix *= BLIST\_RADIX) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00677}00677                         \textcolor{keywordflow}{if} ((scan-\/-\/)-\/>bm\_bitmap == 0)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00678}00678                                 scan-\/>bm\_bitmap \string^= 1;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00679}00679                 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00680}00680                 \textcolor{keywordflow}{if} ((scan-\/-\/)-\/>bm\_bitmap == 0)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00681}00681                         scan[-\/digit * \mbox{\hyperlink{subr__blist_8c_af44e0ae4fbe868a189ddd0d930cf898c}{radix\_to\_skip}}(radix)].bm\_bitmap \string^=}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00682}00682                             (u\_daddr\_t)1 << digit;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00683}00683 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00684}00684                 \textcolor{keywordflow}{if} (blk == \mbox{\hyperlink{linker__if_8m_a9f8ed6df20d1d777399fd4f0f7f5a719}{start}})}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00685}00685                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00686}00686                 \textcolor{comment}{/* Clear all the bits of this leaf. */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00687}00687                 scan-\/>bm\_bitmap = 0;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00688}00688         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00689}00689         \textcolor{keywordflow}{return} (\mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00690}00690 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00691}00691 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00692}00692 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00693}00693 \textcolor{comment}{ * BLST\_LEAF\_ALLOC() -\/  allocate at a leaf in the radix tree (a bitmap).}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00694}00694 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00695}00695 \textcolor{comment}{ *      This function is the core of the allocator.  Its execution time is}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00696}00696 \textcolor{comment}{ *      proportional to log(count), plus height of the tree if the allocation}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00697}00697 \textcolor{comment}{ *      crosses a leaf boundary.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00698}00698 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00699}00699 \textcolor{keyword}{static} daddr\_t}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00700}\mbox{\hyperlink{subr__blist_8c_a858d9cd71802889c80942f04368dedb7}{00700}} \mbox{\hyperlink{subr__blist_8c_a858d9cd71802889c80942f04368dedb7}{blst\_leaf\_alloc}}(blmeta\_t *scan, daddr\_t blk, \textcolor{keywordtype}{int} *\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, \textcolor{keywordtype}{int} \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}})}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00701}00701 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00702}00702         u\_daddr\_t \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00703}00703         \textcolor{keywordtype}{int} bighint, count1, hi, lo, num\_shifts;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00704}00704 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00705}00705         count1 = *\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00706}00706         num\_shifts = fls(count1);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00707}00707         \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} = \string~scan-\/>bm\_bitmap;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00708}00708         \textcolor{keywordflow}{while} ((\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} \& (\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} + 1)) != 0 \&\& num\_shifts > 0) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00709}00709                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00710}00710 \textcolor{comment}{                 * If bit i is 0 in mask, then bits in [i, i + (count1 >>}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00711}00711 \textcolor{comment}{                 * num\_shifts)] are 1 in scan-\/>bm\_bitmap.  Reduce num\_shifts to}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00712}00712 \textcolor{comment}{                 * 0, while preserving this invariant.  The updates to mask}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00713}00713 \textcolor{comment}{                 * leave fewer bits 0, but each bit that remains 0 represents a}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00714}00714 \textcolor{comment}{                 * longer string of consecutive 1-\/bits in scan-\/>bm\_bitmap.  If}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00715}00715 \textcolor{comment}{                 * more updates to mask cannot set more bits, because mask is}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00716}00716 \textcolor{comment}{                 * partitioned with all 1 bits following all 0 bits, the loop}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00717}00717 \textcolor{comment}{                 * terminates immediately.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00718}00718 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00719}00719                 num\_shifts-\/-\/;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00720}00720                 \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} |= \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} >> ((count1 >> num\_shifts) + 1) / 2;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00721}00721         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00722}00722         bighint = count1 >> num\_shifts;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00723}00723         \textcolor{keywordflow}{if} (\string~\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} == 0) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00724}00724                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00725}00725 \textcolor{comment}{                 * Update bighint.  There is no allocation bigger than}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00726}00726 \textcolor{comment}{                 * count1 >> num\_shifts starting in this leaf.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00727}00727 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00728}00728                 scan-\/>bm\_bighint = bighint;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00729}00729                 \textcolor{keywordflow}{return} (SWAPBLK\_NONE);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00730}00730         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00731}00731 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00732}00732         \textcolor{comment}{/* Discard any candidates that appear before blk. */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00733}00733         \textcolor{keywordflow}{if} ((blk \& \mbox{\hyperlink{subr__blist_8c_a9f5cd6fad634cdccff3bda0bba4409ef}{BLIST\_MASK}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00734}00734                 \textcolor{keywordflow}{if} ((\string~\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} \& \mbox{\hyperlink{subr__blist_8c_a8cfe20099bd8649e36f32d03d2860952}{bitrange}}(0, blk \& \mbox{\hyperlink{subr__blist_8c_a9f5cd6fad634cdccff3bda0bba4409ef}{BLIST\_MASK}})) != 0) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00735}00735                         \textcolor{comment}{/* Grow bighint in case all discarded bits are set. */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00736}00736                         bighint += blk \& \mbox{\hyperlink{subr__blist_8c_a9f5cd6fad634cdccff3bda0bba4409ef}{BLIST\_MASK}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00737}00737                         \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} |= \mbox{\hyperlink{subr__blist_8c_a8cfe20099bd8649e36f32d03d2860952}{bitrange}}(0, blk \& \mbox{\hyperlink{subr__blist_8c_a9f5cd6fad634cdccff3bda0bba4409ef}{BLIST\_MASK}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00738}00738                         \textcolor{keywordflow}{if} (\string~\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} == 0) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00739}00739                                 scan-\/>bm\_bighint = bighint;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00740}00740                                 \textcolor{keywordflow}{return} (SWAPBLK\_NONE);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00741}00741                         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00742}00742                 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00743}00743                 blk -\/= blk \& \mbox{\hyperlink{subr__blist_8c_a9f5cd6fad634cdccff3bda0bba4409ef}{BLIST\_MASK}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00744}00744         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00745}00745 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00746}00746         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00747}00747 \textcolor{comment}{         * The least significant set bit in mask marks the start of the first}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00748}00748 \textcolor{comment}{         * available range of sufficient size.  Find its position.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00749}00749 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00750}00750         lo = \mbox{\hyperlink{subr__blist_8c_a9d0e3fb6075efa4b306afdee927146b7}{bitpos}}(\string~\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00751}00751 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00752}00752         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00753}00753 \textcolor{comment}{         * Find how much space is available starting at that position.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00754}00754 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00755}00755         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} \& (\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} + 1)) != 0) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00756}00756                 \textcolor{comment}{/* Count the 1 bits starting at position lo. */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00757}00757                 hi = \mbox{\hyperlink{subr__blist_8c_a9d0e3fb6075efa4b306afdee927146b7}{bitpos}}(\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} \& (\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} + 1)) + count1;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00758}00758                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}} < hi -\/ lo)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00759}00759                         hi = lo + \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00760}00760                 *\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}} = hi -\/ lo;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00761}00761                 \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} = \string~bitrange(lo, *\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00762}00762         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}} <= BLIST\_RADIX -\/ lo) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00763}00763                 \textcolor{comment}{/* All the blocks we can use are available here. */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00764}00764                 hi = lo + \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00765}00765                 *\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}} = \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00766}00766                 \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} = \string~bitrange(lo, *\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00767}00767                 \textcolor{keywordflow}{if} (hi == BLIST\_RADIX)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00768}00768                         scan-\/>bm\_bighint = bighint;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00769}00769         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00770}00770                 \textcolor{comment}{/* Check next leaf for some of the blocks we want or need. */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00771}00771                 count1 = *\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}} -\/ (BLIST\_RADIX -\/ lo);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00772}00772                 \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}} -\/= BLIST\_RADIX -\/ lo;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00773}00773                 hi = \mbox{\hyperlink{subr__blist_8c_a536f57c0b32199545b5ac84e285a343a}{blst\_next\_leaf\_alloc}}(scan, blk, count1, \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00774}00774                 \textcolor{keywordflow}{if} (hi < count1)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00775}00775                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00776}00776 \textcolor{comment}{                         * The next leaf cannot supply enough blocks to reach}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00777}00777 \textcolor{comment}{                         * the minimum required allocation.  The hint cannot be}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00778}00778 \textcolor{comment}{                         * updated, because the same allocation request could}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00779}00779 \textcolor{comment}{                         * be satisfied later, by this leaf, if the state of}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00780}00780 \textcolor{comment}{                         * the next leaf changes, and without any changes to}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00781}00781 \textcolor{comment}{                         * this leaf.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00782}00782 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00783}00783                         \textcolor{keywordflow}{return} (SWAPBLK\_NONE);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00784}00784                 *\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}} = BLIST\_RADIX -\/ lo + hi;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00785}00785                 scan-\/>bm\_bighint = bighint;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00786}00786         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00787}00787 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00788}00788         \textcolor{comment}{/* Clear the allocated bits from this leaf. */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00789}00789         scan-\/>bm\_bitmap \&= \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00790}00790         \textcolor{keywordflow}{return} (blk + lo);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00791}00791 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00792}00792 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00793}00793 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00794}00794 \textcolor{comment}{ * blist\_meta\_alloc() -\/ allocate at a meta in the radix tree.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00795}00795 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00796}00796 \textcolor{comment}{ *      Attempt to allocate at a meta node.  If we can't, we update}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00797}00797 \textcolor{comment}{ *      bighint and return a failure.  Updating bighint optimize future}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00798}00798 \textcolor{comment}{ *      calls that hit this node.  We have to check for our collapse cases}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00799}00799 \textcolor{comment}{ *      and we have a few optimizations strewn in as well.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00800}00800 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00801}00801 \textcolor{keyword}{static} daddr\_t}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00802}\mbox{\hyperlink{subr__blist_8c_a019d18bfc6d77dfff4f78799c88280c8}{00802}} \mbox{\hyperlink{subr__blist_8c_a019d18bfc6d77dfff4f78799c88280c8}{blst\_meta\_alloc}}(blmeta\_t *scan, daddr\_t cursor, \textcolor{keywordtype}{int} *\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00803}00803     \textcolor{keywordtype}{int} \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}}, u\_daddr\_t radix)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00804}00804 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00805}00805         daddr\_t blk, i, r, skip;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00806}00806         u\_daddr\_t \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00807}00807         \textcolor{keywordtype}{bool} scan\_from\_start;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00808}00808         \textcolor{keywordtype}{int} digit;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00809}00809 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00810}00810         \textcolor{keywordflow}{if} (radix == 1)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00811}00811                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{subr__blist_8c_a858d9cd71802889c80942f04368dedb7}{blst\_leaf\_alloc}}(scan, cursor, \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}}));}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00812}00812         blk = cursor \& -\/(radix * BLIST\_RADIX);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00813}00813         scan\_from\_start = (cursor == blk);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00814}00814         skip = \mbox{\hyperlink{subr__blist_8c_af44e0ae4fbe868a189ddd0d930cf898c}{radix\_to\_skip}}(radix);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00815}00815         \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} = scan-\/>bm\_bitmap;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00816}00816 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00817}00817         \textcolor{comment}{/* Discard any candidates that appear before cursor. */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00818}00818         digit = (cursor / radix) \& \mbox{\hyperlink{subr__blist_8c_a9f5cd6fad634cdccff3bda0bba4409ef}{BLIST\_MASK}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00819}00819         \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} \&= (u\_daddr\_t)-\/1 << digit;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00820}00820         \textcolor{keywordflow}{if} (\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} == 0)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00821}00821                 \textcolor{keywordflow}{return} (SWAPBLK\_NONE);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00822}00822 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00823}00823         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00824}00824 \textcolor{comment}{         * If the first try is for a block that includes the cursor, pre-\/undo}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00825}00825 \textcolor{comment}{         * the digit * radix offset in the first call; otherwise, ignore the}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00826}00826 \textcolor{comment}{         * cursor entirely.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00827}00827 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00828}00828         \textcolor{keywordflow}{if} (((\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} >> digit) \& 1) == 1)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00829}00829                 cursor -\/= digit * radix;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00830}00830         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00831}00831                 cursor = blk;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00832}00832 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00833}00833         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00834}00834 \textcolor{comment}{         * Examine the nonempty subtree associated with each bit set in mask.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00835}00835 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00836}00836         \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00837}00837                 digit = \mbox{\hyperlink{subr__blist_8c_a9d0e3fb6075efa4b306afdee927146b7}{bitpos}}(\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00838}00838                 i = 1 + digit * skip;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00839}00839                 \textcolor{keywordflow}{if} (*\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}} <= scan[i].bm\_bighint) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00840}00840                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00841}00841 \textcolor{comment}{                         * The allocation might fit beginning in the i'th subtree.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00842}00842 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00843}00843                         r = \mbox{\hyperlink{subr__blist_8c_a019d18bfc6d77dfff4f78799c88280c8}{blst\_meta\_alloc}}(\&scan[i], cursor + digit * radix,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00844}00844                             \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}}, radix / BLIST\_RADIX);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00845}00845                         \textcolor{keywordflow}{if} (r != SWAPBLK\_NONE) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00846}00846                                 \textcolor{keywordflow}{if} (scan[i].bm\_bitmap == 0)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00847}00847                                         scan-\/>bm\_bitmap \string^= \mbox{\hyperlink{subr__blist_8c_a8cfe20099bd8649e36f32d03d2860952}{bitrange}}(digit, 1);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00848}00848                                 \textcolor{keywordflow}{return} (r);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00849}00849                         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00850}00850                 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00851}00851                 cursor = blk;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00852}00852         \} \textcolor{keywordflow}{while} ((\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} \string^= \mbox{\hyperlink{subr__blist_8c_a8cfe20099bd8649e36f32d03d2860952}{bitrange}}(digit, 1)) != 0);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00853}00853 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00854}00854         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00855}00855 \textcolor{comment}{         * We couldn't allocate count in this subtree.  If the whole tree was}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00856}00856 \textcolor{comment}{         * scanned, and the last tree node is allocated, update bighint.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00857}00857 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00858}00858         \textcolor{keywordflow}{if} (scan\_from\_start \&\& !(digit == BLIST\_RADIX -\/ 1 \&\&}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00859}00859             scan[i].bm\_bighint == BLIST\_MAX\_ALLOC))}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00860}00860                 scan-\/>bm\_bighint = *\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00861}00861 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00862}00862         \textcolor{keywordflow}{return} (SWAPBLK\_NONE);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00863}00863 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00864}00864 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00865}00865 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00866}00866 \textcolor{comment}{ * BLST\_LEAF\_FREE() -\/   free allocated block from leaf bitmap}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00867}00867 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00868}00868 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00869}00869 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00870}\mbox{\hyperlink{subr__blist_8c_afff382593d21459df0b6d051413f51b0}{00870}} \mbox{\hyperlink{subr__blist_8c_afff382593d21459df0b6d051413f51b0}{blst\_leaf\_free}}(blmeta\_t *scan, daddr\_t blk, \textcolor{keywordtype}{int} \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}})}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00871}00871 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00872}00872         u\_daddr\_t \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00873}00873 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00874}00874         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00875}00875 \textcolor{comment}{         * free some data in this bitmap}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00876}00876 \textcolor{comment}{         * mask=0000111111111110000}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00877}00877 \textcolor{comment}{         *          \(\backslash\)\_\_\_\_\_\_\_\_\_/\(\backslash\)\_\_/}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00878}00878 \textcolor{comment}{         *              count   n}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00879}00879 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00880}00880         \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} = \mbox{\hyperlink{subr__blist_8c_a8cfe20099bd8649e36f32d03d2860952}{bitrange}}(blk \& \mbox{\hyperlink{subr__blist_8c_a9f5cd6fad634cdccff3bda0bba4409ef}{BLIST\_MASK}}, \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00881}00881         KASSERT((scan-\/>bm\_bitmap \& \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}}) == 0,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00882}00882             (\textcolor{stringliteral}{"{}freeing free block: \%jx, size \%d, mask \%jx"{}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00883}00883             (uintmax\_t)blk, \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, (uintmax\_t)scan-\/>bm\_bitmap \& \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}}));}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00884}00884         scan-\/>bm\_bitmap |= \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00885}00885 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00886}00886 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00887}00887 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00888}00888 \textcolor{comment}{ * BLST\_META\_FREE() -\/ free allocated blocks from radix tree meta info}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00889}00889 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00890}00890 \textcolor{comment}{ *      This support routine frees a range of blocks from the bitmap.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00891}00891 \textcolor{comment}{ *      The range must be entirely enclosed by this radix node.  If a}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00892}00892 \textcolor{comment}{ *      meta node, we break the range down recursively to free blocks}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00893}00893 \textcolor{comment}{ *      in subnodes (which means that this code can free an arbitrary}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00894}00894 \textcolor{comment}{ *      range whereas the allocation code cannot allocate an arbitrary}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00895}00895 \textcolor{comment}{ *      range).}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00896}00896 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00897}00897 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00898}\mbox{\hyperlink{subr__blist_8c_afd05c54e3d506a139f10a3eda0797f37}{00898}} \mbox{\hyperlink{subr__blist_8c_afd05c54e3d506a139f10a3eda0797f37}{blst\_meta\_free}}(blmeta\_t *scan, daddr\_t freeBlk, daddr\_t \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, u\_daddr\_t radix)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00899}00899 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00900}00900         daddr\_t blk, endBlk, i, skip;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00901}00901         \textcolor{keywordtype}{int} digit, endDigit;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00902}00902 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00903}00903         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00904}00904 \textcolor{comment}{         * We could probably do a better job here.  We are required to make}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00905}00905 \textcolor{comment}{         * bighint at least as large as the biggest allocable block of data.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00906}00906 \textcolor{comment}{         * If we just shoehorn it, a little extra overhead will be incurred}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00907}00907 \textcolor{comment}{         * on the next allocation (but only that one typically).}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00908}00908 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00909}00909         scan-\/>bm\_bighint = BLIST\_MAX\_ALLOC;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00910}00910 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00911}00911         \textcolor{keywordflow}{if} (radix == 1)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00912}00912                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{subr__blist_8c_afff382593d21459df0b6d051413f51b0}{blst\_leaf\_free}}(scan, freeBlk, \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}));}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00913}00913 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00914}00914         endBlk = freeBlk + \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00915}00915         blk = (freeBlk + radix * BLIST\_RADIX) \& -\/(radix * BLIST\_RADIX);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00916}00916         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00917}00917 \textcolor{comment}{         * blk is first block past the end of the range of this meta node,}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00918}00918 \textcolor{comment}{         * or 0 in case of overflow.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00919}00919 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00920}00920         \textcolor{keywordflow}{if} (blk != 0)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00921}00921                 endBlk = ummin(endBlk, blk);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00922}00922         skip = \mbox{\hyperlink{subr__blist_8c_af44e0ae4fbe868a189ddd0d930cf898c}{radix\_to\_skip}}(radix);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00923}00923         blk = freeBlk \& -\/radix;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00924}00924         digit = (blk / radix) \& \mbox{\hyperlink{subr__blist_8c_a9f5cd6fad634cdccff3bda0bba4409ef}{BLIST\_MASK}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00925}00925         endDigit = 1 + (((endBlk -\/ 1) / radix) \& \mbox{\hyperlink{subr__blist_8c_a9f5cd6fad634cdccff3bda0bba4409ef}{BLIST\_MASK}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00926}00926         scan-\/>bm\_bitmap |= \mbox{\hyperlink{subr__blist_8c_a8cfe20099bd8649e36f32d03d2860952}{bitrange}}(digit, endDigit -\/ digit);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00927}00927         \textcolor{keywordflow}{for} (i = 1 + digit * skip; blk < endBlk; i += skip) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00928}00928                 blk += radix;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00929}00929                 \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}} = ummin(blk, endBlk) -\/ freeBlk;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00930}00930                 \mbox{\hyperlink{subr__blist_8c_afd05c54e3d506a139f10a3eda0797f37}{blst\_meta\_free}}(\&scan[i], freeBlk, \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, radix / BLIST\_RADIX);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00931}00931                 freeBlk = blk;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00932}00932         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00933}00933 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00934}00934 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00935}00935 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00936}00936 \textcolor{comment}{ * BLST\_COPY() -\/ copy one radix tree to another}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00937}00937 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00938}00938 \textcolor{comment}{ *      Locates free space in the source tree and frees it in the destination}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00939}00939 \textcolor{comment}{ *      tree.  The space may not already be free in the destination.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00940}00940 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00941}00941 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00942}\mbox{\hyperlink{subr__blist_8c_ac7fce013f3c04060bc7a94bb66095abc}{00942}} \mbox{\hyperlink{subr__blist_8c_ac7fce013f3c04060bc7a94bb66095abc}{blst\_copy}}(blmeta\_t *scan, daddr\_t blk, daddr\_t radix, blist\_t dest,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00943}00943     daddr\_t \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}})}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00944}00944 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00945}00945         daddr\_t endBlk, i, skip;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00946}00946 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00947}00947         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00948}00948 \textcolor{comment}{         * Leaf node}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00949}00949 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00950}00950 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00951}00951         \textcolor{keywordflow}{if} (radix == 1) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00952}00952                 u\_daddr\_t v = scan-\/>bm\_bitmap;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00953}00953 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00954}00954                 \textcolor{keywordflow}{if} (v == (u\_daddr\_t)-\/1) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00955}00955                         \mbox{\hyperlink{subr__blist_8c_ac55e4677f8a94a1fdbc278e48697478f}{blist\_free}}(dest, blk, \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00956}00956                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (v != 0) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00957}00957                         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00958}00958 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00959}00959                         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}; ++i) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00960}00960                                 \textcolor{keywordflow}{if} (v \& ((u\_daddr\_t)1 << i))}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00961}00961                                         \mbox{\hyperlink{subr__blist_8c_ac55e4677f8a94a1fdbc278e48697478f}{blist\_free}}(dest, blk + i, 1);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00962}00962                         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00963}00963                 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00964}00964                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00965}00965         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00966}00966 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00967}00967         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00968}00968 \textcolor{comment}{         * Meta node}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00969}00969 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00970}00970 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00971}00971         \textcolor{keywordflow}{if} (scan-\/>bm\_bitmap == 0) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00972}00972                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00973}00973 \textcolor{comment}{                 * Source all allocated, leave dest allocated}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00974}00974 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00975}00975                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00976}00976         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00977}00977 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00978}00978         endBlk = blk + \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00979}00979         skip = \mbox{\hyperlink{subr__blist_8c_af44e0ae4fbe868a189ddd0d930cf898c}{radix\_to\_skip}}(radix);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00980}00980         \textcolor{keywordflow}{for} (i = 1; blk < endBlk; i += skip) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00981}00981                 blk += radix;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00982}00982                 \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}} = radix;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00983}00983                 \textcolor{keywordflow}{if} (blk >= endBlk)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00984}00984                         \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}} -\/= blk -\/ endBlk;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00985}00985                 \mbox{\hyperlink{subr__blist_8c_ac7fce013f3c04060bc7a94bb66095abc}{blst\_copy}}(\&scan[i], blk -\/ radix,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00986}00986                     radix / BLIST\_RADIX, dest, \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00987}00987         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00988}00988 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00989}00989 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00990}00990 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00991}00991 \textcolor{comment}{ * BLST\_LEAF\_FILL() -\/   allocate specific blocks in leaf bitmap}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00992}00992 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00993}00993 \textcolor{comment}{ *      This routine allocates all blocks in the specified range}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00994}00994 \textcolor{comment}{ *      regardless of any existing allocations in that range.  Returns}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00995}00995 \textcolor{comment}{ *      the number of blocks allocated by the call.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00996}00996 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00997}00997 \textcolor{keyword}{static} daddr\_t}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00998}\mbox{\hyperlink{subr__blist_8c_a2b2fdd48a21b9b7c033b2da8b8848771}{00998}} \mbox{\hyperlink{subr__blist_8c_a2b2fdd48a21b9b7c033b2da8b8848771}{blst\_leaf\_fill}}(blmeta\_t *scan, daddr\_t blk, \textcolor{keywordtype}{int} \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}})}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l00999}00999 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01000}01000         daddr\_t nblks;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01001}01001         u\_daddr\_t \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01002}01002 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01003}01003         \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} = \mbox{\hyperlink{subr__blist_8c_a8cfe20099bd8649e36f32d03d2860952}{bitrange}}(blk \& \mbox{\hyperlink{subr__blist_8c_a9f5cd6fad634cdccff3bda0bba4409ef}{BLIST\_MASK}}, \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01004}01004 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01005}01005         \textcolor{comment}{/* Count the number of blocks that we are allocating. */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01006}01006         nblks = bitcount64(scan-\/>bm\_bitmap \& \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01007}01007 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01008}01008         scan-\/>bm\_bitmap \&= \string~mask;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01009}01009         \textcolor{keywordflow}{return} (nblks);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01010}01010 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01011}01011 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01012}01012 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01013}01013 \textcolor{comment}{ * BLIST\_META\_FILL() -\/  allocate specific blocks at a meta node}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01014}01014 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01015}01015 \textcolor{comment}{ *      This routine allocates the specified range of blocks,}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01016}01016 \textcolor{comment}{ *      regardless of any existing allocations in the range.  The}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01017}01017 \textcolor{comment}{ *      range must be within the extent of this node.  Returns the}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01018}01018 \textcolor{comment}{ *      number of blocks allocated by the call.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01019}01019 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01020}01020 \textcolor{keyword}{static} daddr\_t}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01021}\mbox{\hyperlink{subr__blist_8c_abaa44d6fd0c36c755754816b91349cda}{01021}} \mbox{\hyperlink{subr__blist_8c_abaa44d6fd0c36c755754816b91349cda}{blst\_meta\_fill}}(blmeta\_t *scan, daddr\_t allocBlk, daddr\_t \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, u\_daddr\_t radix)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01022}01022 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01023}01023         daddr\_t blk, endBlk, i, nblks, skip;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01024}01024         \textcolor{keywordtype}{int} digit;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01025}01025 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01026}01026         \textcolor{keywordflow}{if} (radix == 1)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01027}01027                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{subr__blist_8c_a2b2fdd48a21b9b7c033b2da8b8848771}{blst\_leaf\_fill}}(scan, allocBlk, \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}));}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01028}01028 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01029}01029         endBlk = allocBlk + \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01030}01030         blk = (allocBlk + radix * BLIST\_RADIX) \& -\/(radix * BLIST\_RADIX);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01031}01031         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01032}01032 \textcolor{comment}{         * blk is first block past the end of the range of this meta node,}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01033}01033 \textcolor{comment}{         * or 0 in case of overflow.}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01034}01034 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01035}01035         \textcolor{keywordflow}{if} (blk != 0)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01036}01036                 endBlk = ummin(endBlk, blk);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01037}01037         skip = \mbox{\hyperlink{subr__blist_8c_af44e0ae4fbe868a189ddd0d930cf898c}{radix\_to\_skip}}(radix);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01038}01038         blk = allocBlk \& -\/radix;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01039}01039         nblks = 0;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01040}01040         \textcolor{keywordflow}{while} (blk < endBlk) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01041}01041                 digit = (blk / radix) \& \mbox{\hyperlink{subr__blist_8c_a9f5cd6fad634cdccff3bda0bba4409ef}{BLIST\_MASK}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01042}01042                 i = 1 + digit * skip;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01043}01043                 blk += radix;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01044}01044                 \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}} = ummin(blk, endBlk) -\/ allocBlk;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01045}01045                 nblks += \mbox{\hyperlink{subr__blist_8c_abaa44d6fd0c36c755754816b91349cda}{blst\_meta\_fill}}(\&scan[i], allocBlk, \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01046}01046                     radix / BLIST\_RADIX);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01047}01047                 \textcolor{keywordflow}{if} (scan[i].bm\_bitmap == 0)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01048}01048                         scan-\/>bm\_bitmap \&= \string~((u\_daddr\_t)1 << digit);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01049}01049                 allocBlk = blk;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01050}01050         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01051}01051         \textcolor{keywordflow}{return} (nblks);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01052}01052 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01053}01053 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01054}01054 \textcolor{preprocessor}{\#ifdef BLIST\_DEBUG}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01055}01055 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01056}01056 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01057}01057 blst\_radix\_print(blmeta\_t *scan, daddr\_t blk, daddr\_t radix, \textcolor{keywordtype}{int} tab)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01058}01058 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01059}01059         daddr\_t skip;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01060}01060         u\_daddr\_t \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01061}01061         \textcolor{keywordtype}{int} digit;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01062}01062 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01063}01063         \textcolor{keywordflow}{if} (radix == 1) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01064}01064                 \mbox{\hyperlink{subr__prf_8c_a55f3d956bb2ba20b5059e9e25484a47f}{printf}}(}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01065}01065                     \textcolor{stringliteral}{"{}\%*.*s(\%08llx,\%lld): bitmap \%0*llx big=\%lld\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01066}01066                     tab, tab, \textcolor{stringliteral}{"{}"{}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01067}01067                     (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})blk, (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})BLIST\_RADIX,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01068}01068                     (\textcolor{keywordtype}{int})(1 + (BLIST\_RADIX -\/ 1) / 4),}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01069}01069                     (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})scan-\/>bm\_bitmap,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01070}01070                     (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})scan-\/>bm\_bighint}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01071}01071                 );}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01072}01072                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01073}01073         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01074}01074 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01075}01075         \mbox{\hyperlink{subr__prf_8c_a55f3d956bb2ba20b5059e9e25484a47f}{printf}}(}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01076}01076             \textcolor{stringliteral}{"{}\%*.*s(\%08llx): subtree (\%lld/\%lld) bitmap \%0*llx big=\%lld \{\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01077}01077             tab, tab, \textcolor{stringliteral}{"{}"{}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01078}01078             (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})blk, (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})radix * BLIST\_RADIX,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01079}01079             (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})radix * BLIST\_RADIX,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01080}01080             (\textcolor{keywordtype}{int})(1 + (BLIST\_RADIX -\/ 1) / 4),}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01081}01081             (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})scan-\/>bm\_bitmap,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01082}01082             (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})scan-\/>bm\_bighint}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01083}01083         );}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01084}01084 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01085}01085         skip = \mbox{\hyperlink{subr__blist_8c_af44e0ae4fbe868a189ddd0d930cf898c}{radix\_to\_skip}}(radix);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01086}01086         tab += 4;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01087}01087 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01088}01088         \mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} = scan-\/>bm\_bitmap;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01089}01089         \textcolor{comment}{/* Examine the nonempty subtree associated with each bit set in mask */}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01090}01090         \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01091}01091                 digit = \mbox{\hyperlink{subr__blist_8c_a9d0e3fb6075efa4b306afdee927146b7}{bitpos}}(\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01092}01092                 blst\_radix\_print(\&scan[1 + digit * skip], blk + digit * radix,}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01093}01093                     radix / BLIST\_RADIX, tab);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01094}01094         \} \textcolor{keywordflow}{while} ((\mbox{\hyperlink{subr__acl__nfs4_8c_ab77cc972f3ee899689ba053015472ccd}{mask}} \string^= \mbox{\hyperlink{subr__blist_8c_a8cfe20099bd8649e36f32d03d2860952}{bitrange}}(digit, 1)) != 0);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01095}01095         tab -\/= 4;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01096}01096 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01097}01097         \mbox{\hyperlink{subr__prf_8c_a55f3d956bb2ba20b5059e9e25484a47f}{printf}}(}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01098}01098             \textcolor{stringliteral}{"{}\%*.*s\}\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01099}01099             tab, tab, \textcolor{stringliteral}{"{}"{}}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01100}01100         );}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01101}01101 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01102}01102 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01103}01103 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01104}01104 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01105}01105 \textcolor{preprocessor}{\#ifdef BLIST\_DEBUG}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01106}01106 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01107}01107 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01108}01108 main(\textcolor{keywordtype}{int} ac, \textcolor{keywordtype}{char} **av)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01109}01109 \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01110}01110         daddr\_t size = BLIST\_RADIX * BLIST\_RADIX;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01111}01111         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01112}01112         blist\_t bl;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01113}01113         \textcolor{keyword}{struct }sbuf *s;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01114}01114 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01115}01115         \textcolor{keywordflow}{for} (i = 1; i < ac; ++i) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01116}01116                 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *ptr = av[i];}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01117}01117                 \textcolor{keywordflow}{if} (*ptr != \textcolor{charliteral}{'-\/'}) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01118}01118                         size = strtoll(ptr, NULL, 0);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01119}01119                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01120}01120                 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01121}01121                 ptr += 2;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01122}01122                 fprintf(stderr, \textcolor{stringliteral}{"{}Bad option: \%s\(\backslash\)n"{}}, ptr -\/ 2);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01123}01123                 exit(1);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01124}01124         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01125}01125         bl = \mbox{\hyperlink{subr__blist_8c_a835399d5962d134c68ff244375042bf1}{blist\_create}}(size, M\_WAITOK);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01126}01126         \textcolor{keywordflow}{if} (bl == NULL) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01127}01127                 fprintf(stderr, \textcolor{stringliteral}{"{}blist\_create failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01128}01128                 exit(1);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01129}01129         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01130}01130         \mbox{\hyperlink{subr__blist_8c_ac55e4677f8a94a1fdbc278e48697478f}{blist\_free}}(bl, 0, size);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01131}01131 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01132}01132         \textcolor{keywordflow}{for} (;;) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01133}01133                 \textcolor{keywordtype}{char} \mbox{\hyperlink{vfs__syscalls_8c_a6defe41b89c760943b86089ec1838319}{buf}}[1024];}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01134}01134                 \textcolor{keywordtype}{long} \textcolor{keywordtype}{long} da = 0;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01135}01135                 \textcolor{keywordtype}{int} \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}} = 0, \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}} = 0;}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01136}01136 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01137}01137                 \mbox{\hyperlink{subr__prf_8c_a55f3d956bb2ba20b5059e9e25484a47f}{printf}}(\textcolor{stringliteral}{"{}\%lld/\%lld/\%lld> "{}}, (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})\mbox{\hyperlink{subr__blist_8c_a5993e45314f74b0ccc5e927415158f62}{blist\_avail}}(bl),}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01138}01138                     (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})size, (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})bl-\/>bl\_radix * BLIST\_RADIX);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01139}01139                 fflush(stdout);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01140}01140                 \textcolor{keywordflow}{if} (fgets(\mbox{\hyperlink{vfs__syscalls_8c_a6defe41b89c760943b86089ec1838319}{buf}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{vfs__syscalls_8c_a6defe41b89c760943b86089ec1838319}{buf}}), stdin) == NULL)}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01141}01141                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01142}01142                 \textcolor{keywordflow}{switch}(\mbox{\hyperlink{vfs__syscalls_8c_a6defe41b89c760943b86089ec1838319}{buf}}[0]) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01143}01143                 \textcolor{keywordflow}{case} \textcolor{charliteral}{'r'}:}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01144}01144                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{subr__scanf_8c_a67ab9c2964af25613f4159eab8733ee8}{sscanf}}(\mbox{\hyperlink{vfs__syscalls_8c_a6defe41b89c760943b86089ec1838319}{buf}} + 1, \textcolor{stringliteral}{"{}\%d"{}}, \&\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}) == 1) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01145}01145                                 \mbox{\hyperlink{subr__blist_8c_aa05d0abb3e68eaf54bcc48cf56d955fa}{blist\_resize}}(\&bl, \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, 1, M\_WAITOK);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01146}01146                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01147}01147                                 \mbox{\hyperlink{subr__prf_8c_a55f3d956bb2ba20b5059e9e25484a47f}{printf}}(\textcolor{stringliteral}{"{}?\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01148}01148                         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01149}01149                 \textcolor{keywordflow}{case} \textcolor{charliteral}{'p'}:}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01150}01150                         blist\_print(bl);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01151}01151                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01152}01152                 \textcolor{keywordflow}{case} \textcolor{charliteral}{'s'}:}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01153}01153                         s = sbuf\_new\_auto();}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01154}01154                         \mbox{\hyperlink{subr__blist_8c_abd2b9996f488b203a0ea847b4eb25bfa}{blist\_stats}}(bl, s);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01155}01155                         \mbox{\hyperlink{subr__sbuf_8c_a29e35276bb1dcf4342f5a49ec3d0068a}{sbuf\_finish}}(s);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01156}01156                         \mbox{\hyperlink{subr__prf_8c_a55f3d956bb2ba20b5059e9e25484a47f}{printf}}(\textcolor{stringliteral}{"{}\%s"{}}, \mbox{\hyperlink{subr__sbuf_8c_a852f3538d102353413a73cea9f2efd1f}{sbuf\_data}}(s));}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01157}01157                         \mbox{\hyperlink{subr__sbuf_8c_a60934581249642aa5f426992ace71542}{sbuf\_delete}}(s);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01158}01158                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01159}01159                 \textcolor{keywordflow}{case} \textcolor{charliteral}{'a'}:}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01160}01160                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{subr__scanf_8c_a67ab9c2964af25613f4159eab8733ee8}{sscanf}}(\mbox{\hyperlink{vfs__syscalls_8c_a6defe41b89c760943b86089ec1838319}{buf}} + 1, \textcolor{stringliteral}{"{}\%d\%d"{}}, \&\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, \&\mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}}) == 2) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01161}01161                                 daddr\_t blk = \mbox{\hyperlink{subr__blist_8c_a9ec406462791785fa4bd40285756c0cf}{blist\_alloc}}(bl, \&\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}, \mbox{\hyperlink{msi__if_8m_a528e51fddfc19d5bc9fe1de7685d613d}{maxcount}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01162}01162                                 \mbox{\hyperlink{subr__prf_8c_a55f3d956bb2ba20b5059e9e25484a47f}{printf}}(\textcolor{stringliteral}{"{}    R=\%08llx, c=\%08d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01163}01163                                     (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})blk, \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01164}01164                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01165}01165                                 \mbox{\hyperlink{subr__prf_8c_a55f3d956bb2ba20b5059e9e25484a47f}{printf}}(\textcolor{stringliteral}{"{}?\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01166}01166                         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01167}01167                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01168}01168                 \textcolor{keywordflow}{case} \textcolor{charliteral}{'f'}:}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01169}01169                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{subr__scanf_8c_a67ab9c2964af25613f4159eab8733ee8}{sscanf}}(\mbox{\hyperlink{vfs__syscalls_8c_a6defe41b89c760943b86089ec1838319}{buf}} + 1, \textcolor{stringliteral}{"{}\%llx \%d"{}}, \&da, \&\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}) == 2) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01170}01170                                 \mbox{\hyperlink{subr__blist_8c_ac55e4677f8a94a1fdbc278e48697478f}{blist\_free}}(bl, da, \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01171}01171                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01172}01172                                 \mbox{\hyperlink{subr__prf_8c_a55f3d956bb2ba20b5059e9e25484a47f}{printf}}(\textcolor{stringliteral}{"{}?\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01173}01173                         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01174}01174                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01175}01175                 \textcolor{keywordflow}{case} \textcolor{charliteral}{'l'}:}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01176}01176                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{subr__scanf_8c_a67ab9c2964af25613f4159eab8733ee8}{sscanf}}(\mbox{\hyperlink{vfs__syscalls_8c_a6defe41b89c760943b86089ec1838319}{buf}} + 1, \textcolor{stringliteral}{"{}\%llx \%d"{}}, \&da, \&\mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}) == 2) \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01177}01177                                 \mbox{\hyperlink{subr__prf_8c_a55f3d956bb2ba20b5059e9e25484a47f}{printf}}(\textcolor{stringliteral}{"{}    n=\%jd\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01178}01178                                     (intmax\_t)\mbox{\hyperlink{subr__blist_8c_aa2974205d4ef6dfa4d290325886eadde}{blist\_fill}}(bl, da, \mbox{\hyperlink{cpufreq__if_8m_ad43c3812e6d13e0518d9f8b8f463ffcf}{count}}));}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01179}01179                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01180}01180                                 \mbox{\hyperlink{subr__prf_8c_a55f3d956bb2ba20b5059e9e25484a47f}{printf}}(\textcolor{stringliteral}{"{}?\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01181}01181                         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01182}01182                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01183}01183                 \textcolor{keywordflow}{case} \textcolor{charliteral}{'?'}:}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01184}01184                 \textcolor{keywordflow}{case} \textcolor{charliteral}{'h'}:}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01185}01185                         puts(}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01186}01186                             \textcolor{stringliteral}{"{}p          -\/print\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01187}01187                             \textcolor{stringliteral}{"{}s          -\/stats\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01188}01188                             \textcolor{stringliteral}{"{}a \%d \%d    -\/allocate\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01189}01189                             \textcolor{stringliteral}{"{}f \%x \%d    -\/free\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01190}01190                             \textcolor{stringliteral}{"{}l \%x \%d    -\/fill\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01191}01191                             \textcolor{stringliteral}{"{}r \%d       -\/resize\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01192}01192                             \textcolor{stringliteral}{"{}h/?        -\/help\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01193}01193                             \textcolor{stringliteral}{"{}q          -\/quit"{}}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01194}01194                         );}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01195}01195                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01196}01196                 \textcolor{keywordflow}{case} \textcolor{charliteral}{'q'}:}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01197}01197                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01198}01198                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01199}01199                         \mbox{\hyperlink{subr__prf_8c_a55f3d956bb2ba20b5059e9e25484a47f}{printf}}(\textcolor{stringliteral}{"{}?\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01200}01200                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01201}01201                 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01202}01202                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{vfs__syscalls_8c_a6defe41b89c760943b86089ec1838319}{buf}}[0] == \textcolor{charliteral}{'q'})}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01203}01203                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01204}01204         \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01205}01205         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01206}01206 \}}
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01207}01207 }
\DoxyCodeLine{\Hypertarget{subr__blist_8c_source_l01208}01208 \textcolor{preprocessor}{\#endif}}

\end{DoxyCode}
