summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1996-01-28 23:41:40 +0000
committerdyson <dyson@FreeBSD.org>1996-01-28 23:41:40 +0000
commit894b801eee9d8be5ef1af76d3e74a844a61ff35d (patch)
tree440e43c26eb51e6dd745db1a85e9274631291057 /sys
parent026024aadddf151f1052a03c6d81ca98a747d629 (diff)
downloadFreeBSD-src-894b801eee9d8be5ef1af76d3e74a844a61ff35d.zip
FreeBSD-src-894b801eee9d8be5ef1af76d3e74a844a61ff35d.tar.gz
Enable the new fast pipe code. The old pipes can be used with the
"OLD_PIPE" config option.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_descrip.c12
-rw-r--r--sys/kern/uipc_syscalls.c5
-rw-r--r--sys/sys/file.h3
3 files changed, 16 insertions, 4 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 1e98212..5c781e5 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94
- * $Id: kern_descrip.c,v 1.22 1995/12/08 23:21:31 phk Exp $
+ * $Id: kern_descrip.c,v 1.23 1995/12/14 08:31:14 phk Exp $
*/
#include <sys/param.h>
@@ -57,6 +57,7 @@
#include <sys/malloc.h>
#include <sys/unistd.h>
#include <sys/resourcevar.h>
+#include <sys/pipe.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
@@ -424,6 +425,10 @@ ofstat(p, uap, retval)
error = soo_stat((struct socket *)fp->f_data, &ub);
break;
+ case DTYPE_PIPE:
+ error = pipe_stat((struct pipe *)fp->f_data, &ub);
+ break;
+
default:
panic("ofstat");
/*NOTREACHED*/
@@ -469,6 +474,10 @@ fstat(p, uap, retval)
error = soo_stat((struct socket *)fp->f_data, &ub);
break;
+ case DTYPE_PIPE:
+ error = pipe_stat((struct pipe *)fp->f_data, &ub);
+ break;
+
default:
panic("fstat");
/*NOTREACHED*/
@@ -503,6 +512,7 @@ fpathconf(p, uap, retval)
return (EBADF);
switch (fp->f_type) {
+ case DTYPE_PIPE:
case DTYPE_SOCKET:
if (uap->name != _PC_PIPE_BUF)
return (EINVAL);
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 3a13420..0595f90 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94
- * $Id: uipc_syscalls.c,v 1.11 1996/01/01 10:28:21 peter Exp $
+ * $Id: uipc_syscalls.c,v 1.12 1996/01/03 21:42:21 wollman Exp $
*/
#include "opt_ktrace.h"
@@ -1018,6 +1018,7 @@ getsockopt(p, uap, retval)
return (error);
}
+#ifdef OLD_PIPE
/* ARGSUSED */
int
pipe(p, uap, retval)
@@ -1070,7 +1071,7 @@ free1:
(void)soclose(rso);
return (error);
}
-
+#endif
/*
* Get socket name.
*/
diff --git a/sys/sys/file.h b/sys/sys/file.h
index 309a732..df210ac 100644
--- a/sys/sys/file.h
+++ b/sys/sys/file.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)file.h 8.1 (Berkeley) 6/2/93
- * $Id: file.h,v 1.4 1995/02/20 19:42:37 guido Exp $
+ * $Id: file.h,v 1.5 1995/03/16 18:16:16 bde Exp $
*/
#ifndef _SYS_FILE_H_
@@ -54,6 +54,7 @@ struct file {
short f_flag; /* see fcntl.h */
#define DTYPE_VNODE 1 /* file */
#define DTYPE_SOCKET 2 /* communications endpoint */
+#define DTYPE_PIPE 3 /* pipe */
short f_type; /* descriptor type */
short f_count; /* reference count */
short f_msgcount; /* references from message queue */
OpenPOWER on IntegriCloud