1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-28 16:43:09 +00:00

Enable the new fast pipe code. The old pipes can be used with the

"OLD_PIPE" config option.
This commit is contained in:
John Dyson 1996-01-28 23:41:40 +00:00
parent 10c5615c1d
commit f982721359
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13676
3 changed files with 16 additions and 4 deletions

View File

@ -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);

View File

@ -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 @@ pipe(p, uap, retval)
(void)soclose(rso);
return (error);
}
#endif
/*
* Get socket name.
*/

View File

@ -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 */