Dejulianize DIAGNOSTIC panic code. The types are wrong; probably there's

a missing dereference.
This commit is contained in:
Garrett Wollman 1997-08-16 19:07:20 +00:00
parent 2a13325f76
commit 62f74f2f72

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_synch.c 8.9 (Berkeley) 5/19/95
* $Id: kern_synch.c,v 1.33 1997/08/08 22:48:57 julian Exp $
* $Id: kern_synch.c,v 1.34 1997/08/13 19:29:33 julian Exp $
*/
#include "opt_ktrace.h"
@ -349,14 +349,16 @@ tsleep(ident, priority, wmesg, timo)
return (0);
}
#ifdef DIAGNOSTIC
if( p == NULL )
if(p == NULL)
panic("tsleep1");
if (ident == NULL || p->p_stat != SRUN)
panic("tsleep");
/* XXX This is not exhaustive, just the most common case */
if ((p->p_procq.tqe_next != NULL)
&& (p->p_procq.tqe_next == p->p_procq.tqe_prev)
&& (*p->p_procq.tqe_prev == p))
#if 0 /* XXX this is impossible... the types don't even match */
&& (p->p_procq.tqe_next == p->p_procq.tqe_prev)
#endif
&& (*p->p_procq.tqe_prev == p))
panic("sleeping process on run queue");
#endif
p->p_wchan = ident;