diff options
author | julian <julian@FreeBSD.org> | 2004-09-02 23:37:41 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2004-09-02 23:37:41 +0000 |
commit | 46d094592603413902a3f1feefd88827b54c2bb0 (patch) | |
tree | 8f485625f0e5987c802253baf9e1ab2aa2f7fecd /sys | |
parent | bb849ef032f5f3659769289434d385c994df286e (diff) | |
download | FreeBSD-src-46d094592603413902a3f1feefd88827b54c2bb0.zip FreeBSD-src-46d094592603413902a3f1feefd88827b54c2bb0.tar.gz |
remove unused code
MFC after: 2 days
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_switch.c | 109 |
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 - |