New deadlock check at proc.c.

New exit checks (stop IPC).
This commit is contained in:
Jorrit Herder
2005-10-12 15:08:23 +00:00
parent 5a9dec8bd2
commit b16a88692a
4 changed files with 78 additions and 23 deletions

View File

@@ -65,7 +65,9 @@ register struct proc *rc; /* slot of process to clean up */
while (*xpp != NIL_PROC) { /* check entire queue */
if (*xpp == rc) { /* process is on the queue */
*xpp = (*xpp)->p_q_link; /* replace by next process */
break; /* done, can only send one */
kprintf("Proc %d removed from queue at %d\n",
proc_nr(rc), rc->p_sendto);
break; /* can only be queued once */
}
xpp = &(*xpp)->p_q_link; /* proceed to next queued */
}
@@ -81,11 +83,13 @@ register struct proc *rc; /* slot of process to clean up */
if ((rp->p_rts_flags & RECEIVING) && rp->p_getfrom == proc_nr(rc)) {
rp->p_reg.retreg = EDEADSRCDST; /* report source died */
rp->p_rts_flags &= ~RECEIVING; /* no longer receiving */
kprintf("Proc %d receive dead src %d\n", proc_nr(rp), proc_nr(rc));
lock_enqueue(rp); /* let process run again */
}
else if ((rp->p_rts_flags & SENDING) && rp->p_sendto == proc_nr(rc)) {
rp->p_reg.retreg = EDEADSRCDST; /* report destination died */
rp->p_rts_flags &= ~SENDING; /* no longer sending */
kprintf("Proc %d send dead dst %d\n", proc_nr(rp), proc_nr(rc));
lock_enqueue(rp); /* let process run again */
}
}