[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.74 and 1.74.2.1

version 1.74, 2002/03/09 18:06:55 version 1.74.2.1, 2002/03/12 07:53:25
Line 1 
Line 1 
 /*      $NetBSD$        */  /*      $NetBSD$        */
   
 /*-  /*-
  * Copyright (c) 1997, 1999, 2000 The NetBSD Foundation, Inc.   * Copyright (c) 1997, 1999, 2000, 2002 The NetBSD Foundation, Inc.
  * All rights reserved.   * All rights reserved.
  *   *
  * This code is derived from software contributed to The NetBSD Foundation   * This code is derived from software contributed to The NetBSD Foundation
Line 871  pool_get(struct pool *pp, int flags)
Line 871  pool_get(struct pool *pp, int flags)
   
         pr_leave(pp);          pr_leave(pp);
         simple_unlock(&pp->pr_slock);          simple_unlock(&pp->pr_slock);
           KASSERT((((vaddr_t)v + pp->pr_itemoffset) & (pp->pr_align - 1)) == 0);
         return (v);          return (v);
 }  }
   
Line 1090  pool_prime_page(struct pool *pp, caddr_t
Line 1091  pool_prime_page(struct pool *pp, caddr_t
 {  {
         struct pool_item *pi;          struct pool_item *pi;
         caddr_t cp = storage;          caddr_t cp = storage;
         unsigned int align = pp->pr_align;          const unsigned int align = pp->pr_align;
         unsigned int ioff = pp->pr_itemoffset;          const unsigned int ioff = pp->pr_itemoffset;
           const unsigned int alignsize = roundup(pp->pr_size, align);
         int n;          int n;
   
 #ifdef DIAGNOSTIC  #ifdef DIAGNOSTIC
Line 1127  pool_prime_page(struct pool *pp, caddr_t
Line 1129  pool_prime_page(struct pool *pp, caddr_t
         if (ioff != 0)          if (ioff != 0)
                 cp = (caddr_t)(cp + (align - ioff));                  cp = (caddr_t)(cp + (align - ioff));
   
           KASSERT((((vaddr_t)cp + ioff) & (align - 1)) == 0);
   
         /*          /*
          * Insert remaining chunks on the bucket list.           * Insert remaining chunks on the bucket list.
          */           */
Line 1141  pool_prime_page(struct pool *pp, caddr_t
Line 1145  pool_prime_page(struct pool *pp, caddr_t
 #ifdef DIAGNOSTIC  #ifdef DIAGNOSTIC
                 pi->pi_magic = PI_MAGIC;                  pi->pi_magic = PI_MAGIC;
 #endif  #endif
                 cp = (caddr_t)(cp + pp->pr_size);                  cp = (caddr_t)(cp + alignsize);
   
                   KASSERT((((vaddr_t)cp + ioff) & (align - 1)) == 0);
         }          }
   
         /*          /*
Line 1697  pool_cache_get(struct pool_cache *pc, in
Line 1703  pool_cache_get(struct pool_cache *pc, in
                                 return (NULL);                                  return (NULL);
                         }                          }
                 }                  }
                   KASSERT((((vaddr_t)object + pc->pc_pool->pr_itemoffset) &
                       (pc->pc_pool->pr_align - 1)) == 0);
                 return (object);                  return (object);
         }          }
   
Line 1710  pool_cache_get(struct pool_cache *pc, in
Line 1718  pool_cache_get(struct pool_cache *pc, in
   
         simple_unlock(&pc->pc_slock);          simple_unlock(&pc->pc_slock);
   
           KASSERT((((vaddr_t)object + pc->pc_pool->pr_itemoffset) &
               (pc->pc_pool->pr_align - 1)) == 0);
         return (object);          return (object);
 }  }
   

Legend:
Removed from v.1.74  
changed lines
  Added in v.1.74.2.1

CVSweb <webmaster@jp.NetBSD.org>