Date: Sun, 12 Sep 2004 00:22:04 GMT From: Julian Elischer <julian@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 61367 for review Message-ID: <200409120022.i8C0M4uo012007@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=61367 Change 61367 by julian@julian_ref on 2004/09/12 00:21:23 Add line and file info Affected files ... .. //depot/projects/nsched/sys/kern/kern_switch.c#20 edit Differences ... ==== //depot/projects/nsched/sys/kern/kern_switch.c#20 (text+ko) ==== @@ -119,24 +119,27 @@ CTASSERT((RQB_BPW * RQB_LEN) == RQ_NQS); #ifdef INVARIANTS -#define CHECKRUNQ(kg, td) checkrunq((kg), (td)); +#define CHECKRUNQ(kg, td) checkrunq((kg), (td), __FILE__, __LINE__); static void -checkrunq(struct ksegrp *kg, struct thread *td) +checkrunq(struct ksegrp *kg, struct thread *td, char *file, int line) { struct thread *td2; int count = 0; TAILQ_FOREACH(td2, &kg->kg_runq, td_runq) { /* XXX Debugging hack */ if (!TD_ON_RUNQ(td2)) { + printf("%s: line %d", file line); printf("thread in wrong state, td2= %p\n", td2); panic("corruption in runqueue"); } if (td == td2) { + printf("%s: line %d", file line); printf("thread alreadyin runq, td2= %p\n", td); panic("confusion in runqueue"); } if (++count > 10000) { + printf("%s: line %d", file line); printf("corrupt kg_runq, td= %p\n", td); panic("deadlock in runqueue"); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409120022.i8C0M4uo012007>