[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.44 and 1.45

version 1.44, 2000/12/07 19:30:31 version 1.45, 2000/12/07 20:16:56
Line 1588  pcg_get(struct pool_cache_group *pcg)
Line 1588  pcg_get(struct pool_cache_group *pcg)
         u_int idx;          u_int idx;
   
         KASSERT(pcg->pcg_avail <= PCG_NOBJECTS);          KASSERT(pcg->pcg_avail <= PCG_NOBJECTS);
           KASSERT(pcg->pcg_avail != 0);
         idx = --pcg->pcg_avail;          idx = --pcg->pcg_avail;
   
         KASSERT(pcg->pcg_objects[idx] != NULL);          KASSERT(pcg->pcg_objects[idx] != NULL);
Line 1653  pool_cache_get(struct pool_cache *pc, in
Line 1654  pool_cache_get(struct pool_cache *pc, in
   
         if (pcg->pcg_avail == 0)          if (pcg->pcg_avail == 0)
                 pc->pc_allocfrom = NULL;                  pc->pc_allocfrom = NULL;
   
         simple_unlock(&pc->pc_slock);          simple_unlock(&pc->pc_slock);
   
         return (object);          return (object);
Line 1732  pool_cache_do_invalidate(struct pool_cac
Line 1733  pool_cache_do_invalidate(struct pool_cac
                 npcg = TAILQ_NEXT(pcg, pcg_list);                  npcg = TAILQ_NEXT(pcg, pcg_list);
                 while (pcg->pcg_avail != 0) {                  while (pcg->pcg_avail != 0) {
                         object = pcg_get(pcg);                          object = pcg_get(pcg);
                           if (pcg->pcg_avail == 0 && pc->pc_allocfrom == pcg)
                                   pc->pc_allocfrom = NULL;
                         if (pc->pc_dtor != NULL)                          if (pc->pc_dtor != NULL)
                                 (*pc->pc_dtor)(pc->pc_arg, object);                                  (*pc->pc_dtor)(pc->pc_arg, object);
                         (*putit)(pc->pc_pool, object, __FILE__, __LINE__);                          (*putit)(pc->pc_pool, object, __FILE__, __LINE__);

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45

CVSweb <webmaster@jp.NetBSD.org>