[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.76.4.2 and 1.77

version 1.76.4.2, 2002/08/29 05:23:10 version 1.77, 2002/07/11 17:18:48
Line 94  struct pool_item_header {
Line 94  struct pool_item_header {
         TAILQ_HEAD(,pool_item)  ph_itemlist;    /* chunk list for this page */          TAILQ_HEAD(,pool_item)  ph_itemlist;    /* chunk list for this page */
         LIST_ENTRY(pool_item_header)          LIST_ENTRY(pool_item_header)
                                 ph_hashlist;    /* Off-page page headers */                                  ph_hashlist;    /* Off-page page headers */
         unsigned int            ph_nmissing;    /* # of chunks in use */          int                     ph_nmissing;    /* # of chunks in use */
         caddr_t                 ph_page;        /* this page's address */          caddr_t                 ph_page;        /* this page's address */
         struct timeval          ph_time;        /* last referenced */          struct timeval          ph_time;        /* last referenced */
 };  };
Line 415  pool_init(struct pool *pp, size_t size, 
Line 415  pool_init(struct pool *pp, size_t size, 
         if (size < sizeof(struct pool_item))          if (size < sizeof(struct pool_item))
                 size = sizeof(struct pool_item);                  size = sizeof(struct pool_item);
   
         size = roundup(size, align);          size = ALIGN(size);
 #ifdef DIAGNOSTIC  #ifdef DIAGNOSTIC
         if (size > palloc->pa_pagesz)          if (size > palloc->pa_pagesz)
                 panic("pool_init: pool item size (%lu) too large",                  panic("pool_init: pool item size (%lu) too large",
Line 916  pool_do_put(struct pool *pp, void *v)
Line 916  pool_do_put(struct pool *pp, void *v)
 #endif  #endif
   
         TAILQ_INSERT_HEAD(&ph->ph_itemlist, pi, pi_list);          TAILQ_INSERT_HEAD(&ph->ph_itemlist, pi, pi_list);
         KDASSERT(ph->ph_nmissing != 0);  
         ph->ph_nmissing--;          ph->ph_nmissing--;
         pp->pr_nput++;          pp->pr_nput++;
         pp->pr_nitems++;          pp->pr_nitems++;
Line 1126  pool_prime_page(struct pool *pp, caddr_t
Line 1125  pool_prime_page(struct pool *pp, caddr_t
         while (n--) {          while (n--) {
                 pi = (struct pool_item *)cp;                  pi = (struct pool_item *)cp;
   
                 KASSERT(((((vaddr_t)pi) + ioff) & (align - 1)) == 0);  
   
                 /* Insert on page list */                  /* Insert on page list */
                 TAILQ_INSERT_TAIL(&ph->ph_itemlist, pi, pi_list);                  TAILQ_INSERT_TAIL(&ph->ph_itemlist, pi, pi_list);
 #ifdef DIAGNOSTIC  #ifdef DIAGNOSTIC

Legend:
Removed from v.1.76.4.2  
changed lines
  Added in v.1.77

CVSweb <webmaster@jp.NetBSD.org>