Date: Thu, 1 May 2003 06:55:49 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 30304 for review Message-ID: <200305011355.h41DtnHY054340@repoman.freebsd.org>
index | next in thread | raw e-mail
http://perforce.freebsd.org/chv.cgi?CH=30304 Change 30304 by jhb@jhb_laptop on 2003/05/01 06:55:24 Replace printf with an appropriate KASSERT(). Affected files ... .. //depot/projects/smpng/sys/kern/kern_lock.c#26 edit Differences ... ==== //depot/projects/smpng/sys/kern/kern_lock.c#26 (text+ko) ==== @@ -265,12 +265,9 @@ */ if (lkp->lk_lockholder != thr) { lockflags = LK_HAVE_EXCL; -#ifdef INVARIANTS - if (td != NULL && td != curthread) - printf("%s: weird thread pid %d (%s)\n", - __func__, td->td_proc->p_pid, - td->td_proc->p_comm); -#endif + KASSERT(td == NULL || td == &thread0 || + td == curthread, ("%s: bogus thread pid %d", + __func__, td->td_proc->p_pid)); if (td != NULL && !(td->td_flags & TDF_DEADLKTREAT)) lockflags |= LK_WANT_EXCL | LK_WANT_UPGRADE; error = acquire(&lkp, extflags, lockflags);help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305011355.h41DtnHY054340>
