From owner-p4-projects Fri Jun 7 22:48:12 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EB08037B403; Fri, 7 Jun 2002 22:48:04 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2AD0137B400 for ; Fri, 7 Jun 2002 22:48:04 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g585m4H81929 for perforce@freebsd.org; Fri, 7 Jun 2002 22:48:04 -0700 (PDT) (envelope-from jhb@freebsd.org) Date: Fri, 7 Jun 2002 22:48:04 -0700 (PDT) Message-Id: <200206080548.g585m4H81929@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin Subject: PERFORCE change 12537 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=12537 Change 12537 by jhb@jhb_laptop on 2002/06/07 22:47:07 Bah, I can't stick a witness on the free list unless I remove it from the all list and the type list. Unfortunately, these removals are O(n), so I might should just go ahead and make these lists TAILQ's. Affected files ... ... //depot/projects/smpng/sys/kern/subr_witness.c#56 edit Differences ... ==== //depot/projects/smpng/sys/kern/subr_witness.c#56 (text+ko) ==== @@ -391,9 +391,16 @@ * If no locks for this witness were ever acquired, * then return the witness to the free list. */ - if (w->w_file == NULL) + if (w->w_file == NULL) { + if (w->w_class->lc_flags & LC_SLEEPLOCK) + STAILQ_REMOVE(&w_sleep, w, witness, + w_typelist); + else + STAILQ_REMOVE(&w_spin, w, witness, + w_typelist); + STAILQ_REMOVE(&w_all, w, witness, w_list); witness_free(w); - else if (w->w_dead_squawked == 0) { + } else if (w->w_dead_squawked == 0) { w->w_dead_squawked = 1; print = 1; } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message