Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/chs-ubc2]: src/sys/kern in pool_put(), fill the item with a distinctive ...



details:   https://anonhg.NetBSD.org/src/rev/144a8e621371
branches:  chs-ubc2
changeset: 471359:144a8e621371
user:      chs <chs%NetBSD.org@localhost>
date:      Sun Jul 04 01:37:45 1999 +0000

description:
in pool_put(), fill the item with a distinctive pattern ifdef DEBUG.

diffstat:

 sys/kern/subr_pool.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r eadd6f5f4d32 -r 144a8e621371 sys/kern/subr_pool.c
--- a/sys/kern/subr_pool.c      Sun Jul 04 01:35:32 1999 +0000
+++ b/sys/kern/subr_pool.c      Sun Jul 04 01:37:45 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_pool.c,v 1.21.2.2.2.1 1999/06/21 01:24:03 thorpej Exp $   */
+/*     $NetBSD: subr_pool.c,v 1.21.2.2.2.2 1999/07/04 01:37:45 chs Exp $       */
 
 /*-
  * Copyright (c) 1997, 1999 The NetBSD Foundation, Inc.
@@ -841,9 +841,17 @@
         * Return to item list.
         */
 #ifdef DIAGNOSTIC
-       /* XXX Should fill the item. */
        pi->pi_magic = PI_MAGIC;
 #endif
+#ifdef DEBUG
+       {
+               int i, *ip = v;
+
+               for (i = 0; i < pp->pr_size / 4; i++) {
+                       *ip++ = PI_MAGIC;
+               }
+       }
+#endif
        TAILQ_INSERT_HEAD(&ph->ph_itemlist, pi, pi_list);
        ph->ph_nmissing--;
        pp->pr_nput++;



Home | Main Index | Thread Index | Old Index