summaryrefslogtreecommitdiffstats
path: root/sys/kern/sys_pipe.c
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1996-06-17 05:15:01 +0000
committerdyson <dyson@FreeBSD.org>1996-06-17 05:15:01 +0000
commitd2388564564ad010bc13e91009dd96923c478154 (patch)
treeb8545bf3dd4b00a6926a38e2d8c528f1d6213f7d /sys/kern/sys_pipe.c
parent5cd11c9038b5115e97e2e655cd920bcea58b0f99 (diff)
downloadFreeBSD-src-d2388564564ad010bc13e91009dd96923c478154.zip
FreeBSD-src-d2388564564ad010bc13e91009dd96923c478154.tar.gz
Disable direct writes for non-blocking output.
Diffstat (limited to 'sys/kern/sys_pipe.c')
-rw-r--r--sys/kern/sys_pipe.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
index 0df5269..6cdd7b4 100644
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -16,7 +16,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: sys_pipe.c,v 1.15 1996/03/25 01:48:28 dyson Exp $
+ * $Id: sys_pipe.c,v 1.16 1996/06/12 05:07:32 gpalmer Exp $
*/
#ifndef OLD_PIPE
@@ -733,8 +733,11 @@ pipewrite(wpipe, uio, nbio)
/*
* If the transfer is large, we can gain performance if
* we do process-to-process copies directly.
+ * If the write is non-blocking, we don't use the
+ * direct write mechanism.
*/
- if ((amountpipekva < LIMITPIPEKVA) &&
+ if ((wpipe->pipe_state & PIPE_NBIO) == 0 &&
+ (amountpipekva < LIMITPIPEKVA) &&
(uio->uio_iov->iov_len >= PIPE_MINDIRECT)) {
error = pipe_direct_write( wpipe, uio);
if (error) {
OpenPOWER on IntegriCloud