Various fixes and improvements.
- fixed bug that caused IDLE to panic (irq hook inconsistency); - kprintf() now accepts multiple arguments; moved to utility.c; - prepare_shutdown() signals system processes with SIGKSTOP; - phys_fill() renamed to phys_memset(), argument order changed; - kmemset() removed in favor of phys_kmemset(); - kstrncpy() removed in favor of phys_copy(); - katoi, kstrncmp replaced by normal library procedure again; - rm_irq_handler() interface changed (simply pass hook pointer);
This commit is contained in:
@@ -120,35 +120,35 @@ check_runqueues(char *when)
|
||||
|
||||
for (q=0; q < NR_SCHED_QUEUES; q++) {
|
||||
if(rdy_head[q] && !rdy_tail[q]) {
|
||||
kprintf("head but no tail: %s", (karg_t) when);
|
||||
kprintf("head but no tail: %s", when);
|
||||
panic("scheduling error", NO_NUM);
|
||||
}
|
||||
if(!rdy_head[q] && rdy_tail[q]) {
|
||||
kprintf("tail but no head: %s", (karg_t) when);
|
||||
kprintf("tail but no head: %s", when);
|
||||
panic("scheduling error", NO_NUM);
|
||||
}
|
||||
if(rdy_tail[q] && rdy_tail[q]->p_nextready != NIL_PROC) {
|
||||
kprintf("tail and tail->next not null; %s", (karg_t) when);
|
||||
kprintf("tail and tail->next not null; %s", when);
|
||||
panic("scheduling error", NO_NUM);
|
||||
}
|
||||
for(xp = rdy_head[q]; xp != NIL_PROC; xp = xp->p_nextready) {
|
||||
if (!xp->p_ready) {
|
||||
kprintf("scheduling error: unready on runq: %s\n", (karg_t) when);
|
||||
kprintf("scheduling error: unready on runq: %s\n", when);
|
||||
|
||||
panic("found unready process on run queue", NO_NUM);
|
||||
}
|
||||
if(xp->p_priority != q) {
|
||||
kprintf("scheduling error: wrong priority: %s\n", (karg_t) when);
|
||||
kprintf("scheduling error: wrong priority: %s\n", when);
|
||||
|
||||
panic("wrong priority", NO_NUM);
|
||||
}
|
||||
if(xp->p_found) {
|
||||
kprintf("scheduling error: double scheduling: %s\n", (karg_t) when);
|
||||
kprintf("scheduling error: double scheduling: %s\n", when);
|
||||
panic("proc more than once on scheduling queue", NO_NUM);
|
||||
}
|
||||
xp->p_found = 1;
|
||||
if(xp->p_nextready == NIL_PROC && rdy_tail[q] != xp) {
|
||||
kprintf("scheduling error: last element not tail: %s\n", (karg_t) when);
|
||||
kprintf("scheduling error: last element not tail: %s\n", when);
|
||||
panic("scheduling error", NO_NUM);
|
||||
}
|
||||
if(l++ > PROCLIMIT) panic("loop in schedule queue?", NO_NUM);
|
||||
@@ -157,7 +157,7 @@ check_runqueues(char *when)
|
||||
|
||||
for (xp = BEG_PROC_ADDR; xp < END_PROC_ADDR; ++xp) {
|
||||
if(! isemptyp(xp) && xp->p_ready && ! xp->p_found) {
|
||||
kprintf("scheduling error: ready not on queue: %s\n", (karg_t) when);
|
||||
kprintf("scheduling error: ready not on queue: %s\n", when);
|
||||
panic("ready proc not on scheduling queue", NO_NUM);
|
||||
if(l++ > PROCLIMIT) { panic("loop in proc.t?", NO_NUM); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user