[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.92 and 1.93

version 1.92, 2004/02/22 00:19:48 version 1.93, 2004/03/08 22:48:09
Line 368  pool_init(struct pool *pp, size_t size, 
Line 368  pool_init(struct pool *pp, size_t size, 
 {  {
         int off, slack;          int off, slack;
         size_t trysize, phsize;          size_t trysize, phsize;
           int s;
   
 #ifdef POOL_DIAGNOSTIC  #ifdef POOL_DIAGNOSTIC
         /*          /*
Line 551  pool_init(struct pool *pp, size_t size, 
Line 552  pool_init(struct pool *pp, size_t size, 
         simple_unlock(&pool_head_slock);          simple_unlock(&pool_head_slock);
   
         /* Insert this into the list of pools using this allocator. */          /* Insert this into the list of pools using this allocator. */
           s = splvm();
         simple_lock(&palloc->pa_slock);          simple_lock(&palloc->pa_slock);
         TAILQ_INSERT_TAIL(&palloc->pa_list, pp, pr_alloc_list);          TAILQ_INSERT_TAIL(&palloc->pa_list, pp, pr_alloc_list);
         simple_unlock(&palloc->pa_slock);          simple_unlock(&palloc->pa_slock);
           splx(s);
 }  }
   
 /*  /*
Line 564  pool_destroy(struct pool *pp)
Line 567  pool_destroy(struct pool *pp)
 {  {
         struct pool_item_header *ph;          struct pool_item_header *ph;
         struct pool_cache *pc;          struct pool_cache *pc;
           int s;
   
         /* Locking order: pool_allocator -> pool */          /* Locking order: pool_allocator -> pool */
           s = splvm();
         simple_lock(&pp->pr_alloc->pa_slock);          simple_lock(&pp->pr_alloc->pa_slock);
         TAILQ_REMOVE(&pp->pr_alloc->pa_list, pp, pr_alloc_list);          TAILQ_REMOVE(&pp->pr_alloc->pa_list, pp, pr_alloc_list);
         simple_unlock(&pp->pr_alloc->pa_slock);          simple_unlock(&pp->pr_alloc->pa_slock);
           splx(s);
   
         /* Destroy all caches for this pool. */          /* Destroy all caches for this pool. */
         while ((pc = TAILQ_FIRST(&pp->pr_cachelist)) != NULL)          while ((pc = TAILQ_FIRST(&pp->pr_cachelist)) != NULL)
Line 2091  pool_page_free(struct pool *pp, void *v)
Line 2097  pool_page_free(struct pool *pp, void *v)
 void *  void *
 pool_subpage_alloc(struct pool *pp, int flags)  pool_subpage_alloc(struct pool *pp, int flags)
 {  {
           void *v;
         return (pool_get(&psppool, flags));          int s;
           s = splvm();
           v = pool_get(&psppool, flags);
           splx(s);
           return v;
 }  }
   
 void  void
 pool_subpage_free(struct pool *pp, void *v)  pool_subpage_free(struct pool *pp, void *v)
 {  {
           int s;
           s = splvm();
         pool_put(&psppool, v);          pool_put(&psppool, v);
           splx(s);
 }  }
   
 /* We don't provide a real nointr allocator.  Maybe later. */  /* We don't provide a real nointr allocator.  Maybe later. */

Legend:
Removed from v.1.92  
changed lines
  Added in v.1.93

CVSweb <webmaster@jp.NetBSD.org>