summaryrefslogtreecommitdiffstats
path: root/sys/kern/sys_pipe.c
diff options
context:
space:
mode:
authorpb <pb@FreeBSD.org>2003-07-30 22:50:37 +0000
committerpb <pb@FreeBSD.org>2003-07-30 22:50:37 +0000
commitedb5fbc5cc2aa91573568504f4da98fc234892d9 (patch)
tree34fee790dedcfa044a77955766fa37194fc58f5f /sys/kern/sys_pipe.c
parent72fb563d453e9d9301d51365862f2b2e10ec94ba (diff)
downloadFreeBSD-src-edb5fbc5cc2aa91573568504f4da98fc234892d9.zip
FreeBSD-src-edb5fbc5cc2aa91573568504f4da98fc234892d9.tar.gz
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
Diffstat (limited to 'sys/kern/sys_pipe.c')
-rw-r--r--sys/kern/sys_pipe.c2
1 files changed, 1 insertions, 1 deletions
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 */
OpenPOWER on IntegriCloud