From 221e731e45c258ea9b2a6dd95fc22776dbfd9543 Mon Sep 17 00:00:00 2001 From: Philip Homburg Date: Wed, 14 Jun 2006 13:17:41 +0000 Subject: [PATCH] Wake up writer when selecting for read on an empty pipe. Set fp_revived to NOT_REVIVING when decrementing reviving. --- servers/fs/pipe.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/servers/fs/pipe.c b/servers/fs/pipe.c index a6b68075d..cea632666 100644 --- a/servers/fs/pipe.c +++ b/servers/fs/pipe.c @@ -121,7 +121,7 @@ int notouch; /* check only */ r = SUSPEND; } /* If need be, activate sleeping writers. */ - if (susp_count > 0 && !notouch) + if (susp_count > 0) release(rip, WRITE, susp_count); } return(r); @@ -360,7 +360,10 @@ int proc_nr_e; task = -rfp->fp_task; if (rfp->fp_revived == REVIVING) + { + rfp->fp_revived = NOT_REVIVING; reviving--; + } switch (task) { case XPIPE: /* process trying to read or write a pipe */ -- 2.44.0