From edb5fbc5cc2aa91573568504f4da98fc234892d9 Mon Sep 17 00:00:00 2001 From: pb Date: Wed, 30 Jul 2003 22:50:37 +0000 Subject: Remove test in pipe_write() which causes write(2) to return EAGAIN on a non-blocking pipe in cases where select(2) returns the file descriptor as ready for write. This in turns causes libc_r, for one, to busy wait in such cases. Note: it is a quick performance fix, a more complex fix might be required in case this turns out to have unexpected side effects. Reviewed by: silby MFC after: 3 days --- sys/kern/sys_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/kern/sys_pipe.c') diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 8ced29f..2e63e76 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -1041,7 +1041,7 @@ pipe_write(fp, uio, active_cred, flags, td) if ((space < uio->uio_resid) && (orig_resid <= PIPE_BUF)) space = 0; - if (space > 0 && (wpipe->pipe_buffer.cnt < PIPE_SIZE)) { + if (space > 0) { if ((error = pipelock(wpipe,1)) == 0) { int size; /* Transfer size */ int segsize; /* first segment to transfer */ -- cgit v1.1