Wake up writer when selecting for read on an empty pipe.

Set fp_revived to NOT_REVIVING when decrementing reviving.
This commit is contained in:
Philip Homburg 2006-06-14 13:17:41 +00:00
parent 474d137c39
commit 221e731e45

View File

@ -121,7 +121,7 @@ int notouch; /* check only */
r = SUSPEND; r = SUSPEND;
} }
/* If need be, activate sleeping writers. */ /* If need be, activate sleeping writers. */
if (susp_count > 0 && !notouch) if (susp_count > 0)
release(rip, WRITE, susp_count); release(rip, WRITE, susp_count);
} }
return(r); return(r);
@ -360,7 +360,10 @@ int proc_nr_e;
task = -rfp->fp_task; task = -rfp->fp_task;
if (rfp->fp_revived == REVIVING) if (rfp->fp_revived == REVIVING)
{
rfp->fp_revived = NOT_REVIVING;
reviving--; reviving--;
}
switch (task) { switch (task) {
case XPIPE: /* process trying to read or write a pipe */ case XPIPE: /* process trying to read or write a pipe */