summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_switch.c109
1 files changed, 0 insertions, 109 deletions
diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c
index 69cfb5f..9c45ce6 100644
--- a/sys/kern/kern_switch.c
+++ b/sys/kern/kern_switch.c
@@ -116,11 +116,6 @@ __FBSDID("$FreeBSD$");
CTASSERT((RQB_BPW * RQB_LEN) == RQ_NQS);
-void panc(char *string1, char *string2);
-
-#if 0
-static void runq_readjust(struct runq *rq, struct kse *ke);
-#endif
/************************************************************************
* Functions that manipulate runnability from a thread perspective. *
************************************************************************/
@@ -771,107 +766,3 @@ runq_remove(struct runq *rq, struct kse *ke)
}
}
-#if 0
-void
-panc(char *string1, char *string2)
-{
- printf("%s", string1);
- kdb_enter(string2);
-}
-
-void
-thread_sanity_check(struct thread *td, char *string)
-{
- struct proc *p;
- struct ksegrp *kg;
- struct kse *ke;
- struct thread *td2 = NULL;
- unsigned int prevpri;
- int saw_lastassigned = 0;
- int unassigned = 0;
- int assigned = 0;
-
- p = td->td_proc;
- kg = td->td_ksegrp;
- ke = td->td_kse;
-
-
- if (ke) {
- if (p != ke->ke_proc) {
- panc(string, "wrong proc");
- }
- if (ke->ke_thread != td) {
- panc(string, "wrong thread");
- }
- }
-
- if ((p->p_flag & P_SA) == 0) {
- if (ke == NULL) {
- panc(string, "non KSE thread lost kse");
- }
- } else {
- prevpri = 0;
- saw_lastassigned = 0;
- unassigned = 0;
- assigned = 0;
- TAILQ_FOREACH(td2, &kg->kg_runq, td_runq) {
- if (td2->td_priority < prevpri) {
- panc(string, "thread runqueue unosorted");
- }
- if ((td2->td_state == TDS_RUNQ) &&
- td2->td_kse &&
- (td2->td_kse->ke_state != KES_ONRUNQ)) {
- panc(string, "KSE wrong state");
- }
- prevpri = td2->td_priority;
- if (td2->td_kse) {
- assigned++;
- if (unassigned) {
- panc(string, "unassigned before assigned");
- }
- if (kg->kg_last_assigned == NULL) {
- panc(string, "lastassigned corrupt");
- }
- if (saw_lastassigned) {
- panc(string, "last assigned not last");
- }
- if (td2->td_kse->ke_thread != td2) {
- panc(string, "mismatched kse/thread");
- }
- } else {
- unassigned++;
- }
- if (td2 == kg->kg_last_assigned) {
- saw_lastassigned = 1;
- if (td2->td_kse == NULL) {
- panc(string, "last assigned not assigned");
- }
- }
- }
- if (kg->kg_last_assigned && (saw_lastassigned == 0)) {
- panc(string, "where on earth does lastassigned point?");
- }
-#if 0
- FOREACH_THREAD_IN_GROUP(kg, td2) {
- if (((td2->td_flags & TDF_UNBOUND) == 0) &&
- (TD_ON_RUNQ(td2))) {
- assigned++;
- if (td2->td_kse == NULL) {
- panc(string, "BOUND thread with no KSE");
- }
- }
- }
-#endif
-#if 0
- if ((unassigned + assigned) != kg->kg_runnable) {
- panc(string, "wrong number in runnable");
- }
-#endif
- }
- if (assigned == 12345) {
- printf("%p %p %p %p %p %d, %d",
- td, td2, ke, kg, p, assigned, saw_lastassigned);
- }
-}
-#endif
-
OpenPOWER on IntegriCloud