[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.34 and 1.34.2.1

version 1.34, 2000/05/08 20:09:44 version 1.34.2.1, 2000/06/22 17:09:16
Line 404  pool_init(pp, size, align, ioff, flags, 
Line 404  pool_init(pp, size, align, ioff, flags, 
         /*          /*
          * Check arguments and construct default values.           * Check arguments and construct default values.
          */           */
         if (!powerof2(pagesz) || pagesz > PAGE_SIZE)          if (!powerof2(pagesz))
                 panic("pool_init: page size invalid (%lx)\n", (u_long)pagesz);                  panic("pool_init: page size invalid (%lx)\n", (u_long)pagesz);
   
         if (alloc == NULL && release == NULL) {          if (alloc == NULL && release == NULL) {
Line 425  pool_init(pp, size, align, ioff, flags, 
Line 425  pool_init(pp, size, align, ioff, flags, 
         if (size < sizeof(struct pool_item))          if (size < sizeof(struct pool_item))
                 size = sizeof(struct pool_item);                  size = sizeof(struct pool_item);
   
           size = ALIGN(size);
           if (size >= pagesz)
                   panic("pool_init: pool item size (%lu) too large",
                         (u_long)size);
   
         /*          /*
          * Initialize the pool structure.           * Initialize the pool structure.
          */           */
Line 436  pool_init(pp, size, align, ioff, flags, 
Line 441  pool_init(pp, size, align, ioff, flags, 
         pp->pr_maxpages = UINT_MAX;          pp->pr_maxpages = UINT_MAX;
         pp->pr_roflags = flags;          pp->pr_roflags = flags;
         pp->pr_flags = 0;          pp->pr_flags = 0;
         pp->pr_size = ALIGN(size);          pp->pr_size = size;
         pp->pr_align = align;          pp->pr_align = align;
         pp->pr_wchan = wchan;          pp->pr_wchan = wchan;
         pp->pr_mtype = mtype;          pp->pr_mtype = mtype;
Line 589  _pool_get(pp, flags, file, line)
Line 594  _pool_get(pp, flags, file, line)
         }          }
 #endif  #endif
   
         if (__predict_false(curproc == NULL && (flags & PR_WAITOK) != 0))          if (__predict_false(curproc == NULL && doing_shutdown == 0 &&
                               (flags & PR_WAITOK) != 0))
                 panic("pool_get: must have NOWAIT");                  panic("pool_get: must have NOWAIT");
   
         simple_lock(&pp->pr_slock);          simple_lock(&pp->pr_slock);
Line 1020  pool_prime_page(pp, storage)
Line 1026  pool_prime_page(pp, storage)
         unsigned int ioff = pp->pr_itemoffset;          unsigned int ioff = pp->pr_itemoffset;
         int s, n;          int s, n;
   
           if (((u_long)cp & (pp->pr_pagesz - 1)) != 0)
                   panic("pool_prime_page: %s: unaligned page", pp->pr_wchan);
   
         if ((pp->pr_roflags & PR_PHINPAGE) != 0) {          if ((pp->pr_roflags & PR_PHINPAGE) != 0) {
                 ph = (struct pool_item_header *)(cp + pp->pr_phoffset);                  ph = (struct pool_item_header *)(cp + pp->pr_phoffset);
         } else {          } else {

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.34.2.1

CVSweb <webmaster@jp.NetBSD.org>