[BACK]Return to subr_pool.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / kern

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/kern/subr_pool.c between version 1.8 and 1.13

version 1.8, 1998/08/02 19:07:47 version 1.13, 1998/09/12 17:20:02
Line 17 
Line 17 
  *    documentation and/or other materials provided with the distribution.   *    documentation and/or other materials provided with the distribution.
  * 3. All advertising materials mentioning features or use of this software   * 3. All advertising materials mentioning features or use of this software
  *    must display the following acknowledgement:   *    must display the following acknowledgement:
  *        This product includes software developed by the NetBSD   *      This product includes software developed by the NetBSD
  *        Foundation, Inc. and its contributors.   *      Foundation, Inc. and its contributors.
  * 4. Neither the name of The NetBSD Foundation nor the names of its   * 4. Neither the name of The NetBSD Foundation nor the names of its
  *    contributors may be used to endorse or promote products derived   *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.   *    from this software without specific prior written permission.
Line 384  pool_init(pp, size, align, ioff, flags, 
Line 384  pool_init(pp, size, align, ioff, flags, 
                 /* The page header will be taken from our page header pool */                  /* The page header will be taken from our page header pool */
                 pp->pr_phoffset = 0;                  pp->pr_phoffset = 0;
                 off = pagesz;                  off = pagesz;
                 bzero(pp->pr_hashtab, sizeof(pp->pr_hashtab));                  memset(pp->pr_hashtab, 0, sizeof(pp->pr_hashtab));
         }          }
   
         /*          /*
Line 830  pool_page_alloc(sz, flags, mtype)
Line 830  pool_page_alloc(sz, flags, mtype)
         int flags;          int flags;
         int mtype;          int mtype;
 {  {
           boolean_t waitok = (flags & PR_WAITOK) ? TRUE : FALSE;
   
 #if defined(UVM)  #if defined(UVM)
         return ((void *)uvm_km_alloc_poolpage());          return ((void *)uvm_km_alloc_poolpage(waitok));
 #else  #else
         return ((void *)kmem_alloc_poolpage());          return ((void *)kmem_alloc_poolpage(waitok));
 #endif  #endif
 }  }
   
Line 846  pool_page_free(v, sz, mtype)
Line 847  pool_page_free(v, sz, mtype)
 {  {
   
 #if defined(UVM)  #if defined(UVM)
         uvm_km_free_poolpage((vm_offset_t)v);          uvm_km_free_poolpage((vaddr_t)v);
 #else  #else
         kmem_free_poolpage((vm_offset_t)v);          kmem_free_poolpage((vaddr_t)v);
 #endif  #endif
 }  }
   
 /*  /*
    * Alternate pool page allocator for pools that know they will
    * never be accessed in interrupt context.
    */
   void *
   pool_page_alloc_nointr(sz, flags, mtype)
           unsigned long sz;
           int flags;
           int mtype;
   {
   #if defined(UVM)
           boolean_t waitok = (flags & PR_WAITOK) ? TRUE : FALSE;
   
           /*
            * With UVM, we can use the kernel_map.
            */
           return ((void *)uvm_km_alloc_poolpage1(kernel_map, uvm.kernel_object,
               waitok));
   #else
           /*
            * Can't do anything so cool with Mach VM.
            */
           return (pool_page_alloc(sz, flags, mtype));
   #endif
   }
   
   void
   pool_page_free_nointr(v, sz, mtype)
           void *v;
           unsigned long sz;
           int mtype;
   {
   
   #if defined(UVM)
           uvm_km_free_poolpage1(kernel_map, (vaddr_t)v);
   #else
           pool_page_free(v, sz, mtype);
   #endif
   }
   
   
   /*
  * Release all complete pages that have not been used recently.   * Release all complete pages that have not been used recently.
  */   */
 void  void

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.13

CVSweb <webmaster@jp.NetBSD.org>