Date: Fri, 7 Jun 2002 22:48:04 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 12537 for review Message-ID: <200206080548.g585m4H81929@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206080548.g585m4H81929>