Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern When a pipe was grown to BIG_PIPE_SIZE, we could ge...



details:   https://anonhg.NetBSD.org/src/rev/7a8c7a039f32
branches:  trunk
changeset: 515908:7a8c7a039f32
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Mon Oct 08 07:50:17 2001 +0000

description:
When a pipe was grown to BIG_PIPE_SIZE, we could get in a select()/write() loop
because pipe_poll() and pipe_write() did not agree on when it was okay to write
more data.  Fix pipe_write(), since it seems to be the broken one.

diffstat:

 sys/kern/sys_pipe.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r b0c94ab113c1 -r 7a8c7a039f32 sys/kern/sys_pipe.c
--- a/sys/kern/sys_pipe.c       Mon Oct 08 04:45:29 2001 +0000
+++ b/sys/kern/sys_pipe.c       Mon Oct 08 07:50:17 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sys_pipe.c,v 1.15 2001/09/29 13:48:11 jdolecek Exp $   */
+/*     $NetBSD: sys_pipe.c,v 1.16 2001/10/08 07:50:17 mycroft Exp $    */
 
 /*
  * Copyright (c) 1996 John S. Dyson
@@ -1251,7 +1251,7 @@
                if ((space < uio->uio_resid) && (uio->uio_resid <= PIPE_BUF))
                        space = 0;
 
-               if (space > 0 && (wpipe->pipe_buffer.cnt < PIPE_SIZE)) {
+               if (space > 0) {
                        int size;       /* Transfer size */
                        int segsize;    /* first segment to transfer */
 



Home | Main Index | Thread Index | Old Index