]> Zhao Yanbai Git Server - minix.git/commitdiff
Wake up writer when selecting for read on an empty pipe.
authorPhilip Homburg <philip@cs.vu.nl>
Wed, 14 Jun 2006 13:17:41 +0000 (13:17 +0000)
committerPhilip Homburg <philip@cs.vu.nl>
Wed, 14 Jun 2006 13:17:41 +0000 (13:17 +0000)
Set fp_revived to NOT_REVIVING when decrementing reviving.

servers/fs/pipe.c

index a6b68075d9d264e734c6f98d98bccbbea7fac3af..cea63266668489e7d1fd9a28deca1e648d9368e0 100644 (file)
@@ -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 */