PERFORCE change 30304 for review
John Baldwin
jhb at FreeBSD.org
Thu May 1 06:55:51 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=30304
Change 30304 by jhb at 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);
More information about the p4-projects
mailing list