[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.58 and 1.59

version 1.58, 2001/06/05 04:40:39 version 1.59, 2001/06/05 18:51:04
Line 175  struct pool_log {
Line 175  struct pool_log {
   
 int pool_logsize = POOL_LOGSIZE;  int pool_logsize = POOL_LOGSIZE;
   
 #ifdef DIAGNOSTIC  #ifdef POOL_DIAGNOSTIC
 static __inline void  static __inline void
 pr_log(struct pool *pp, void *v, int action, const char *file, long line)  pr_log(struct pool *pp, void *v, int action, const char *file, long line)
 {  {
Line 272  pr_enter_check(struct pool *pp, void (*p
Line 272  pr_enter_check(struct pool *pp, void (*p
 #define pr_enter(pp, file, line)  #define pr_enter(pp, file, line)
 #define pr_leave(pp)  #define pr_leave(pp)
 #define pr_enter_check(pp, pr)  #define pr_enter_check(pp, pr)
 #endif /* DIAGNOSTIC */  #endif /* POOL_DIAGNOSTIC */
   
 /*  /*
  * Return the pool page header based on page address.   * Return the pool page header based on page address.
Line 477  pool_init(struct pool *pp, size_t size, 
Line 477  pool_init(struct pool *pp, size_t size, 
         pp->pr_hiwat = 0;          pp->pr_hiwat = 0;
         pp->pr_nidle = 0;          pp->pr_nidle = 0;
   
   #ifdef POOL_DIAGNOSTIC
         if (flags & PR_LOGGING) {          if (flags & PR_LOGGING) {
                 if (kmem_map == NULL ||                  if (kmem_map == NULL ||
                     (pp->pr_log = malloc(pool_logsize * sizeof(struct pool_log),                      (pp->pr_log = malloc(pool_logsize * sizeof(struct pool_log),
Line 485  pool_init(struct pool *pp, size_t size, 
Line 486  pool_init(struct pool *pp, size_t size, 
                 pp->pr_curlogentry = 0;                  pp->pr_curlogentry = 0;
                 pp->pr_logsize = pool_logsize;                  pp->pr_logsize = pool_logsize;
         }          }
   #endif
   
         pp->pr_entered_file = NULL;          pp->pr_entered_file = NULL;
         pp->pr_entered_line = 0;          pp->pr_entered_line = 0;
Line 542  pool_destroy(struct pool *pp)
Line 544  pool_destroy(struct pool *pp)
         drainpp = NULL;          drainpp = NULL;
         simple_unlock(&pool_head_slock);          simple_unlock(&pool_head_slock);
   
   #ifdef POOL_DIAGNOSTIC
         if ((pp->pr_roflags & PR_LOGGING) != 0)          if ((pp->pr_roflags & PR_LOGGING) != 0)
                 free(pp->pr_log, M_TEMP);                  free(pp->pr_log, M_TEMP);
   #endif
   
         if (pp->pr_roflags & PR_FREEHEADER)          if (pp->pr_roflags & PR_FREEHEADER)
                 free(pp, M_POOL);                  free(pp, M_POOL);
Line 572  pool_alloc_item_header(struct pool *pp, 
Line 576  pool_alloc_item_header(struct pool *pp, 
  * Grab an item from the pool; must be called at appropriate spl level   * Grab an item from the pool; must be called at appropriate spl level
  */   */
 void *  void *
 #ifdef DIAGNOSTIC  #ifdef POOL_DIAGNOSTIC
 _pool_get(struct pool *pp, int flags, const char *file, long line)  _pool_get(struct pool *pp, int flags, const char *file, long line)
 #else  #else
 pool_get(struct pool *pp, int flags)  pool_get(struct pool *pp, int flags)
Line 942  pool_do_put(struct pool *pp, void *v)
Line 946  pool_do_put(struct pool *pp, void *v)
 /*  /*
  * Return resource to the pool; must be called at appropriate spl level   * Return resource to the pool; must be called at appropriate spl level
  */   */
 #ifdef DIAGNOSTIC  #ifdef POOL_DIAGNOSTIC
 void  void
 _pool_put(struct pool *pp, void *v, const char *file, long line)  _pool_put(struct pool *pp, void *v, const char *file, long line)
 {  {
Line 958  _pool_put(struct pool *pp, void *v, cons
Line 962  _pool_put(struct pool *pp, void *v, cons
         simple_unlock(&pp->pr_slock);          simple_unlock(&pp->pr_slock);
 }  }
 #undef pool_put  #undef pool_put
 #endif /* DIAGNOSTIC */  #endif /* POOL_DIAGNOSTIC */
   
 void  void
 pool_put(struct pool *pp, void *v)  pool_put(struct pool *pp, void *v)
Line 971  pool_put(struct pool *pp, void *v)
Line 975  pool_put(struct pool *pp, void *v)
         simple_unlock(&pp->pr_slock);          simple_unlock(&pp->pr_slock);
 }  }
   
 #ifdef DIAGNOSTIC  #ifdef POOL_DIAGNOSTIC
 #define         pool_put(h, v)  _pool_put((h), (v), __FILE__, __LINE__)  #define         pool_put(h, v)  _pool_put((h), (v), __FILE__, __LINE__)
 #endif  #endif
   
Line 1245  pool_page_free_nointr(void *v, unsigned 
Line 1249  pool_page_free_nointr(void *v, unsigned 
  * Release all complete pages that have not been used recently.   * Release all complete pages that have not been used recently.
  */   */
 void  void
 #ifdef DIAGNOSTIC  #ifdef POOL_DIAGNOSTIC
 _pool_reclaim(struct pool *pp, const char *file, long line)  _pool_reclaim(struct pool *pp, const char *file, long line)
 #else  #else
 pool_reclaim(struct pool *pp)  pool_reclaim(struct pool *pp)

Legend:
Removed from v.1.58  
changed lines
  Added in v.1.59

CVSweb <webmaster@jp.NetBSD.org>