diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1999-02-16 21:27:38 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1999-02-16 21:27:38 +0000 |
commit | 076114decb8bc3f4b8fd742e9b50fac5aafc9425 (patch) | |
tree | 970bedebb0dafe67321cd4aa6ebbe8bd91b5abb1 /sys/kern | |
parent | 73217ea06ff1f15439b31e83098915ae484d1db7 (diff) |
Move defining of PIPE_NODIRECT to pipe.h and conditionalize more code with it.
This allows this code to compile on sparc.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/sys_pipe.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 559ceee1c09..990fd6b79e4 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_pipe.c,v 1.8 1997/11/06 05:58:21 csapuntz Exp $ */ +/* $OpenBSD: sys_pipe.c,v 1.9 1999/02/16 21:27:37 art Exp $ */ /* * Copyright (c) 1996 John S. Dyson @@ -88,15 +88,6 @@ #include <sys/pipe.h> /* - * Use this define if you want to disable *fancy* VM things. Expect an - * approx 30% decrease in transfer rate. This could be useful for - * NetBSD or OpenBSD. - */ -#if defined(__NetBSD__) || defined(__OpenBSD__) -#define PIPE_NODIRECT -#endif - -/* * interfaces to the outside world */ int pipe_read __P((struct file *, struct uio *, struct ucred *)); @@ -981,9 +972,11 @@ pipe_ioctl(fp, cmd, data, p) return (0); case FIONREAD: +#ifndef PIPE_NODIRECT if (mpipe->pipe_state & PIPE_DIRECTW) *(int *)data = mpipe->pipe_map.cnt; else +#endif *(int *)data = mpipe->pipe_buffer.cnt; return (0); |