PERFORCE change 61367 for review

Julian Elischer julian at FreeBSD.org
Sat Sep 11 17:22:05 PDT 2004


http://perforce.freebsd.org/chv.cgi?CH=61367

Change 61367 by julian at 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");
 		}


More information about the p4-projects mailing list