FreeBSD kernel kern code
sys_pipe.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/fcntl.h>
#include <sys/file.h>
#include <sys/filedesc.h>
#include <sys/filio.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/ttycom.h>
#include <sys/stat.h>
#include <sys/malloc.h>
#include <sys/poll.h>
#include <sys/selinfo.h>
#include <sys/signalvar.h>
#include <sys/syscallsubr.h>
#include <sys/sysctl.h>
#include <sys/sysproto.h>
#include <sys/pipe.h>
#include <sys/proc.h>
#include <sys/vnode.h>
#include <sys/uio.h>
#include <sys/user.h>
#include <sys/event.h>
#include <security/mac/mac_framework.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <vm/vm_object.h>
#include <vm/vm_kern.h>
#include <vm/vm_extern.h>
#include <vm/pmap.h>
#include <vm/vm_map.h>
#include <vm/vm_page.h>
#include <vm/uma.h>
Include dependency graph for sys_pipe.c:

Go to the source code of this file.

Macros

#define PIPE_PEER(pipe)    (((pipe)->pipe_type & PIPE_TYPE_NAMED) ? (pipe) : ((pipe)->pipe_peer))
 
#define MINPIPESIZE   (PIPE_SIZE/3)
 
#define MAXPIPESIZE   (2*PIPE_SIZE/3)
 

Functions

 __FBSDID ("$FreeBSD$")
 
static void filt_pipedetach (struct knote *kn)
 
static void filt_pipedetach_notsup (struct knote *kn)
 
static int filt_pipenotsup (struct knote *kn, long hint)
 
static int filt_piperead (struct knote *kn, long hint)
 
static int filt_pipewrite (struct knote *kn, long hint)
 
 SYSCTL_LONG (_kern_ipc, OID_AUTO, maxpipekva, CTLFLAG_RDTUN|CTLFLAG_NOFETCH, &maxpipekva, 0, "Pipe KVA limit")
 
 SYSCTL_LONG (_kern_ipc, OID_AUTO, pipekva, CTLFLAG_RD, &amountpipekva, 0, "Pipe KVA usage")
 
 SYSCTL_INT (_kern_ipc, OID_AUTO, pipefragretry, CTLFLAG_RD, &pipefragretry, 0, "Pipe allocation retries due to fragmentation")
 
 SYSCTL_INT (_kern_ipc, OID_AUTO, pipeallocfail, CTLFLAG_RD, &pipeallocfail, 0, "Pipe allocation failures")
 
 SYSCTL_INT (_kern_ipc, OID_AUTO, piperesizefail, CTLFLAG_RD, &piperesizefail, 0, "Pipe resize failures")
 
 SYSCTL_INT (_kern_ipc, OID_AUTO, piperesizeallowed, CTLFLAG_RW, &piperesizeallowed, 0, "Pipe resizing allowed")
 
static void pipeinit (void *dummy __unused)
 
static void pipeclose (struct pipe *cpipe)
 
static void pipe_free_kmem (struct pipe *cpipe)
 
static int pipe_create (struct pipe *pipe, bool backing)
 
static int pipe_paircreate (struct thread *td, struct pipepair **p_pp)
 
static __inline int pipelock (struct pipe *cpipe, int catch)
 
static __inline void pipeunlock (struct pipe *cpipe)
 
static void pipe_timestamp (struct timespec *tsp)
 
static int pipe_build_write_buffer (struct pipe *wpipe, struct uio *uio)
 
static void pipe_destroy_write_buffer (struct pipe *wpipe)
 
static int pipe_direct_write (struct pipe *wpipe, struct uio *uio)
 
static void pipe_clone_write_buffer (struct pipe *wpipe)
 
static int pipespace (struct pipe *cpipe, int size)
 
static int pipespace_new (struct pipe *cpipe, int size)
 
static int pipe_zone_ctor (void *mem, int size, void *arg, int flags)
 
static int pipe_zone_init (void *mem, int size, int flags)
 
static void pipe_zone_fini (void *mem, int size)
 
 SYSINIT (vfs, SI_SUB_VFS, SI_ORDER_ANY, pipeinit, NULL)
 
static int sysctl_handle_pipe_mindirect (SYSCTL_HANDLER_ARGS)
 
 SYSCTL_OID (_kern_ipc, OID_AUTO, pipe_mindirect, CTLTYPE_LONG|CTLFLAG_RW, &pipe_mindirect, 0, sysctl_handle_pipe_mindirect, "L", "Minimum write size triggering VM optimization")
 
int pipe_named_ctor (struct pipe **ppipe, struct thread *td)
 
void pipe_dtor (struct pipe *dpipe)
 
int kern_pipe (struct thread *td, int fildes[2], int flags, struct filecaps *fcaps1, struct filecaps *fcaps2)
 
int sys_pipe2 (struct thread *td, struct pipe2_args *uap)
 
void pipeselwakeup (struct pipe *cpipe)
 
static int pipe_read (struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, struct thread *td)
 
static int pipe_write (struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, struct thread *td)
 
static int pipe_truncate (struct file *fp, off_t length, struct ucred *active_cred, struct thread *td)
 
static int pipe_ioctl (struct file *fp, u_long cmd, void *data, struct ucred *active_cred, struct thread *td)
 
static int pipe_poll (struct file *fp, int events, struct ucred *active_cred, struct thread *td)
 
static int pipe_stat (struct file *fp, struct stat *ub, struct ucred *active_cred)
 
static int pipe_close (struct file *fp, struct thread *td)
 
static int pipe_chmod (struct file *fp, mode_t mode, struct ucred *active_cred, struct thread *td)
 
static int pipe_chown (struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred, struct thread *td)
 
static int pipe_fill_kinfo (struct file *fp, struct kinfo_file *kif, struct filedesc *fdp)
 
static int pipe_kqfilter (struct file *fp, struct knote *kn)
 

Variables

static fo_rdwr_t pipe_read
 
static fo_rdwr_t pipe_write
 
static fo_truncate_t pipe_truncate
 
static fo_ioctl_t pipe_ioctl
 
static fo_poll_t pipe_poll
 
static fo_kqfilter_t pipe_kqfilter
 
static fo_stat_t pipe_stat
 
static fo_close_t pipe_close
 
static fo_chmod_t pipe_chmod
 
static fo_chown_t pipe_chown
 
static fo_fill_kinfo_t pipe_fill_kinfo
 
struct fileops pipeops
 
static struct filterops pipe_nfiltops
 
static struct filterops pipe_rfiltops
 
static struct filterops pipe_wfiltops
 
static long amountpipekva
 
static int pipefragretry
 
static int pipeallocfail
 
static int piperesizefail
 
static int piperesizeallowed = 1
 
static long pipe_mindirect = PIPE_MINDIRECT
 
static uma_zone_t pipe_zone
 
static struct unrhdr64 pipeino_unr
 
static dev_t pipedev_ino
 

Macro Definition Documentation

◆ MAXPIPESIZE

#define MAXPIPESIZE   (2*PIPE_SIZE/3)

Definition at line 205 of file sys_pipe.c.

◆ MINPIPESIZE

#define MINPIPESIZE   (PIPE_SIZE/3)

Definition at line 204 of file sys_pipe.c.

◆ PIPE_PEER

#define PIPE_PEER (   pipe)     (((pipe)->pipe_type & PIPE_TYPE_NAMED) ? (pipe) : ((pipe)->pipe_peer))

Definition at line 142 of file sys_pipe.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ filt_pipedetach()

static void filt_pipedetach ( struct knote kn)
static

Definition at line 1769 of file sys_pipe.c.

References knlist_remove().

Here is the call graph for this function:

◆ filt_pipedetach_notsup()

static void filt_pipedetach_notsup ( struct knote kn)
static

Definition at line 1834 of file sys_pipe.c.

◆ filt_pipenotsup()

static int filt_pipenotsup ( struct knote kn,
long  hint 
)
static

Definition at line 1840 of file sys_pipe.c.

◆ filt_piperead()

static int filt_piperead ( struct knote kn,
long  hint 
)
static

Definition at line 1780 of file sys_pipe.c.

◆ filt_pipewrite()

static int filt_pipewrite ( struct knote kn,
long  hint 
)
static

Definition at line 1802 of file sys_pipe.c.

◆ kern_pipe()

int kern_pipe ( struct thread *  td,
int  fildes[2],
int  flags,
struct filecaps *  fcaps1,
struct filecaps *  fcaps2 
)

Definition at line 469 of file sys_pipe.c.

References falloc_caps(), fd, fdclose(), finit(), flags, pipe_paircreate(), pipeclose(), and pipeops.

Referenced by sys_pipe2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pipe_build_write_buffer()

static int pipe_build_write_buffer ( struct pipe *  wpipe,
struct uio *  uio 
)
static

Definition at line 896 of file sys_pipe.c.

Referenced by pipe_direct_write().

Here is the caller graph for this function:

◆ pipe_chmod()

static int pipe_chmod ( struct file *  fp,
mode_t  mode,
struct ucred *  active_cred,
struct thread *  td 
)
static

Definition at line 1577 of file sys_pipe.c.

References invfo_chmod(), mode, and vn_chmod().

Here is the call graph for this function:

◆ pipe_chown()

static int pipe_chown ( struct file *  fp,
uid_t  uid,
gid_t  gid,
struct ucred *  active_cred,
struct thread *  td 
)
static

Definition at line 1591 of file sys_pipe.c.

References invfo_chown(), and vn_chown().

Here is the call graph for this function:

◆ pipe_clone_write_buffer()

static void pipe_clone_write_buffer ( struct pipe *  wpipe)
static

Definition at line 961 of file sys_pipe.c.

References pipe_destroy_write_buffer().

Referenced by pipe_direct_write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pipe_close()

static int pipe_close ( struct file *  fp,
struct thread *  td 
)
static

Definition at line 1565 of file sys_pipe.c.

References badfileops, pipe_dtor(), and vnops.

Here is the call graph for this function:

◆ pipe_create()

static int pipe_create ( struct pipe *  pipe,
bool  backing 
)
static

Definition at line 703 of file sys_pipe.c.

References amountpipekva, maxpipekva, pipeino_unr, and pipespace_new().

Referenced by pipe_paircreate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pipe_destroy_write_buffer()

static void pipe_destroy_write_buffer ( struct pipe *  wpipe)
static

Definition at line 941 of file sys_pipe.c.

Referenced by pipe_clone_write_buffer(), and pipe_direct_write().

Here is the caller graph for this function:

◆ pipe_direct_write()

static int pipe_direct_write ( struct pipe *  wpipe,
struct uio *  uio 
)
static

Definition at line 1003 of file sys_pipe.c.

References pipe_build_write_buffer(), pipe_clone_write_buffer(), pipe_destroy_write_buffer(), pipelock(), pipeselwakeup(), pipeunlock(), and wakeup().

Referenced by pipe_write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pipe_dtor()

void pipe_dtor ( struct pipe *  dpipe)

Definition at line 437 of file sys_pipe.c.

References funsetown(), and pipeclose().

Referenced by pipe_close().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pipe_fill_kinfo()

static int pipe_fill_kinfo ( struct file *  fp,
struct kinfo_file *  kif,
struct filedesc *  fdp 
)
static

Definition at line 1606 of file sys_pipe.c.

References vn_fill_kinfo().

Here is the call graph for this function:

◆ pipe_free_kmem()

static void pipe_free_kmem ( struct pipe *  cpipe)
static

Definition at line 1621 of file sys_pipe.c.

References amountpipekva.

Referenced by pipe_paircreate(), pipeclose(), and pipespace_new().

Here is the caller graph for this function:

◆ pipe_ioctl()

static int pipe_ioctl ( struct file *  fp,
u_long  cmd,
void *  data,
struct ucred *  active_cred,
struct thread *  td 
)
static

Definition at line 1369 of file sys_pipe.c.

References data, fgetown(), and fsetown().

Here is the call graph for this function:

◆ pipe_kqfilter()

static int pipe_kqfilter ( struct file *  fp,
struct knote kn 
)
static

Definition at line 1721 of file sys_pipe.c.

References knlist_add(), pipe_nfiltops, PIPE_PEER, pipe_rfiltops, pipe_wfiltops, and vnops.

Here is the call graph for this function:

◆ pipe_named_ctor()

int pipe_named_ctor ( struct pipe **  ppipe,
struct thread *  td 
)

Definition at line 423 of file sys_pipe.c.

References pipe_paircreate().

Here is the call graph for this function:

◆ pipe_paircreate()

static int pipe_paircreate ( struct thread *  td,
struct pipepair **  p_pp 
)
static

Definition at line 364 of file sys_pipe.c.

References knlist_destroy(), knlist_init_mtx(), pipe_create(), pipe_free_kmem(), and pipe_zone.

Referenced by kern_pipe(), and pipe_named_ctor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pipe_poll()

static int pipe_poll ( struct file *  fp,
int  events,
struct ucred *  active_cred,
struct thread *  td 
)
static

Definition at line 1440 of file sys_pipe.c.

References PIPE_PEER, and selrecord().

Here is the call graph for this function:

◆ pipe_read()

static int pipe_read ( struct file *  fp,
struct uio *  uio,
struct ucred *  active_cred,
int  flags,
struct thread *  td 
)
static

Definition at line 716 of file sys_pipe.c.

References amountpipekva, maxpipekva, MINPIPESIZE, pipe_timestamp(), pipelock(), piperesizeallowed, pipeselwakeup(), pipespace(), pipeunlock(), uiomove(), and wakeup().

Here is the call graph for this function:

◆ pipe_stat()

static int pipe_stat ( struct file *  fp,
struct stat *  ub,
struct ucred *  active_cred 
)
static

Definition at line 1518 of file sys_pipe.c.

References pipedev_ino, and vnops.

◆ pipe_timestamp()

static void pipe_timestamp ( struct timespec *  tsp)
static

Definition at line 458 of file sys_pipe.c.

References getnanotime().

Referenced by pipe_read(), pipe_write(), and pipe_zone_ctor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pipe_truncate()

static int pipe_truncate ( struct file *  fp,
off_t  length,
struct ucred *  active_cred,
struct thread *  td 
)
static

Definition at line 1351 of file sys_pipe.c.

References invfo_truncate(), and vnops.

Here is the call graph for this function:

◆ pipe_write()

static int pipe_write ( struct file *  fp,
struct uio *  uio,
struct ucred *  active_cred,
int  flags,
struct thread *  td 
)
static

◆ pipe_zone_ctor()

static int pipe_zone_ctor ( void *  mem,
int  size,
void *  arg,
int  flags 
)
static

Definition at line 291 of file sys_pipe.c.

References pipe_timestamp().

Referenced by pipeinit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pipe_zone_fini()

static void pipe_zone_fini ( void *  mem,
int  size 
)
static

Definition at line 352 of file sys_pipe.c.

Referenced by pipeinit().

Here is the caller graph for this function:

◆ pipe_zone_init()

static int pipe_zone_init ( void *  mem,
int  size,
int  flags 
)
static

Definition at line 339 of file sys_pipe.c.

Referenced by pipeinit().

Here is the caller graph for this function:

◆ pipeclose()

static void pipeclose ( struct pipe *  cpipe)
static

Definition at line 1647 of file sys_pipe.c.

References knlist_destroy(), pipe_free_kmem(), pipe_zone, pipelock(), pipeselwakeup(), pipeunlock(), seldrain(), and wakeup().

Referenced by kern_pipe(), and pipe_dtor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pipeinit()

static void pipeinit ( void *dummy  __unused)
static

Definition at line 255 of file sys_pipe.c.

References pipe_zone, pipe_zone_ctor(), pipe_zone_fini(), pipe_zone_init(), pipedev_ino, and pipeino_unr.

Here is the call graph for this function:

◆ pipelock()

static __inline int pipelock ( struct pipe *  cpipe,
int  catch 
)
static

Definition at line 640 of file sys_pipe.c.

Referenced by pipe_direct_write(), pipe_read(), pipe_write(), and pipeclose().

Here is the caller graph for this function:

◆ pipeselwakeup()

void pipeselwakeup ( struct pipe *  cpipe)

Definition at line 684 of file sys_pipe.c.

References pgsigio(), and selwakeuppri().

Referenced by pipe_direct_write(), pipe_read(), pipe_write(), and pipeclose().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pipespace()

static int pipespace ( struct pipe *  cpipe,
int  size 
)
static

Definition at line 628 of file sys_pipe.c.

References pipespace_new().

Referenced by pipe_read(), and pipe_write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pipespace_new()

static int pipespace_new ( struct pipe *  cpipe,
int  size 
)
static

Definition at line 563 of file sys_pipe.c.

References amountpipekva, pipe_free_kmem(), pipeallocfail, pipefragretry, piperesizefail, ppsratecheck(), and printf().

Referenced by pipe_create(), and pipespace().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pipeunlock()

static __inline void pipeunlock ( struct pipe *  cpipe)
static

Definition at line 668 of file sys_pipe.c.

References wakeup_one().

Referenced by pipe_direct_write(), pipe_read(), pipe_write(), and pipeclose().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_pipe2()

int sys_pipe2 ( struct thread *  td,
struct pipe2_args *  uap 
)

Definition at line 539 of file sys_pipe.c.

References kern_close(), and kern_pipe().

Here is the call graph for this function:

◆ sysctl_handle_pipe_mindirect()

static int sysctl_handle_pipe_mindirect ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 268 of file sys_pipe.c.

References pipe_mindirect, and sysctl_handle_long().

Here is the call graph for this function:

◆ SYSCTL_INT() [1/4]

SYSCTL_INT ( _kern_ipc  ,
OID_AUTO  ,
pipeallocfail  ,
CTLFLAG_RD  ,
pipeallocfail,
,
"Pipe allocation failures"   
)

◆ SYSCTL_INT() [2/4]

SYSCTL_INT ( _kern_ipc  ,
OID_AUTO  ,
pipefragretry  ,
CTLFLAG_RD  ,
pipefragretry,
,
"Pipe allocation retries due to fragmentation"   
)

◆ SYSCTL_INT() [3/4]

SYSCTL_INT ( _kern_ipc  ,
OID_AUTO  ,
piperesizeallowed  ,
CTLFLAG_RW  ,
piperesizeallowed,
,
"Pipe resizing allowed"   
)

◆ SYSCTL_INT() [4/4]

SYSCTL_INT ( _kern_ipc  ,
OID_AUTO  ,
piperesizefail  ,
CTLFLAG_RD  ,
piperesizefail,
,
"Pipe resize failures"   
)

◆ SYSCTL_LONG() [1/2]

SYSCTL_LONG ( _kern_ipc  ,
OID_AUTO  ,
maxpipekva  ,
CTLFLAG_RDTUN|  CTLFLAG_NOFETCH,
maxpipekva,
,
"Pipe KVA limit"   
)

◆ SYSCTL_LONG() [2/2]

SYSCTL_LONG ( _kern_ipc  ,
OID_AUTO  ,
pipekva  ,
CTLFLAG_RD  ,
amountpipekva,
,
"Pipe KVA usage"   
)

◆ SYSCTL_OID()

SYSCTL_OID ( _kern_ipc  ,
OID_AUTO  ,
pipe_mindirect  ,
CTLTYPE_LONG|  CTLFLAG_RW,
pipe_mindirect,
,
sysctl_handle_pipe_mindirect  ,
"L"  ,
"Minimum write size triggering VM optimization"   
)

◆ SYSINIT()

SYSINIT ( vfs  ,
SI_SUB_VFS  ,
SI_ORDER_ANY  ,
pipeinit  ,
NULL   
)

Variable Documentation

◆ amountpipekva

long amountpipekva
static

Definition at line 207 of file sys_pipe.c.

Referenced by pipe_create(), pipe_free_kmem(), pipe_read(), pipe_write(), and pipespace_new().

◆ pipe_chmod

fo_chmod_t pipe_chmod
static

Definition at line 156 of file sys_pipe.c.

◆ pipe_chown

fo_chown_t pipe_chown
static

Definition at line 157 of file sys_pipe.c.

◆ pipe_close

fo_close_t pipe_close
static

Definition at line 155 of file sys_pipe.c.

◆ pipe_fill_kinfo

fo_fill_kinfo_t pipe_fill_kinfo
static

Definition at line 158 of file sys_pipe.c.

◆ pipe_ioctl

fo_ioctl_t pipe_ioctl
static

Definition at line 151 of file sys_pipe.c.

◆ pipe_kqfilter

fo_kqfilter_t pipe_kqfilter
static

Definition at line 153 of file sys_pipe.c.

◆ pipe_mindirect

long pipe_mindirect = PIPE_MINDIRECT
static

Definition at line 212 of file sys_pipe.c.

Referenced by pipe_write(), and sysctl_handle_pipe_mindirect().

◆ pipe_nfiltops

struct filterops pipe_nfiltops
static
Initial value:
= {
.f_isfd = 1,
.f_event = filt_pipenotsup
}
static int filt_pipenotsup(struct knote *kn, long hint)
Definition: sys_pipe.c:1840
static void filt_pipedetach_notsup(struct knote *kn)
Definition: sys_pipe.c:1834

Definition at line 182 of file sys_pipe.c.

Referenced by pipe_kqfilter().

◆ pipe_poll

fo_poll_t pipe_poll
static

Definition at line 152 of file sys_pipe.c.

◆ pipe_read

fo_rdwr_t pipe_read
static

Definition at line 148 of file sys_pipe.c.

◆ pipe_rfiltops

struct filterops pipe_rfiltops
static
Initial value:
= {
.f_isfd = 1,
.f_detach = filt_pipedetach,
.f_event = filt_piperead
}
static int filt_piperead(struct knote *kn, long hint)
Definition: sys_pipe.c:1780
static void filt_pipedetach(struct knote *kn)
Definition: sys_pipe.c:1769

Definition at line 187 of file sys_pipe.c.

Referenced by pipe_kqfilter().

◆ pipe_stat

fo_stat_t pipe_stat
static

Definition at line 154 of file sys_pipe.c.

◆ pipe_truncate

fo_truncate_t pipe_truncate
static

Definition at line 150 of file sys_pipe.c.

◆ pipe_wfiltops

struct filterops pipe_wfiltops
static
Initial value:
= {
.f_isfd = 1,
.f_detach = filt_pipedetach,
.f_event = filt_pipewrite
}
static int filt_pipewrite(struct knote *kn, long hint)
Definition: sys_pipe.c:1802

Definition at line 192 of file sys_pipe.c.

Referenced by pipe_kqfilter().

◆ pipe_write

fo_rdwr_t pipe_write
static

Definition at line 149 of file sys_pipe.c.

◆ pipe_zone

uma_zone_t pipe_zone
static

Definition at line 248 of file sys_pipe.c.

Referenced by pipe_paircreate(), pipeclose(), and pipeinit().

◆ pipeallocfail

int pipeallocfail
static

Definition at line 209 of file sys_pipe.c.

Referenced by pipespace_new().

◆ pipedev_ino

dev_t pipedev_ino
static

Definition at line 250 of file sys_pipe.c.

Referenced by pipe_stat(), and pipeinit().

◆ pipefragretry

int pipefragretry
static

Definition at line 208 of file sys_pipe.c.

Referenced by pipespace_new().

◆ pipeino_unr

struct unrhdr64 pipeino_unr
static

Definition at line 249 of file sys_pipe.c.

Referenced by pipe_create(), and pipeinit().

◆ pipeops

struct fileops pipeops
Initial value:
= {
.fo_read = pipe_read,
.fo_write = pipe_write,
.fo_truncate = pipe_truncate,
.fo_ioctl = pipe_ioctl,
.fo_poll = pipe_poll,
.fo_kqfilter = pipe_kqfilter,
.fo_stat = pipe_stat,
.fo_close = pipe_close,
.fo_chmod = pipe_chmod,
.fo_chown = pipe_chown,
.fo_sendfile = invfo_sendfile,
.fo_fill_kinfo = pipe_fill_kinfo,
.fo_flags = DFLAG_PASSABLE
}
int invfo_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio, struct uio *trl_uio, off_t offset, size_t nbytes, off_t *sent, int flags, struct thread *td)
static fo_poll_t pipe_poll
Definition: sys_pipe.c:152
static fo_rdwr_t pipe_read
Definition: sys_pipe.c:148
static fo_close_t pipe_close
Definition: sys_pipe.c:155
static fo_kqfilter_t pipe_kqfilter
Definition: sys_pipe.c:153
static fo_truncate_t pipe_truncate
Definition: sys_pipe.c:150
static fo_ioctl_t pipe_ioctl
Definition: sys_pipe.c:151
static fo_chown_t pipe_chown
Definition: sys_pipe.c:157
static fo_rdwr_t pipe_write
Definition: sys_pipe.c:149
static fo_stat_t pipe_stat
Definition: sys_pipe.c:154
static fo_chmod_t pipe_chmod
Definition: sys_pipe.c:156
static fo_fill_kinfo_t pipe_fill_kinfo
Definition: sys_pipe.c:158

Definition at line 160 of file sys_pipe.c.

Referenced by kern_pipe().

◆ piperesizeallowed

int piperesizeallowed = 1
static

Definition at line 211 of file sys_pipe.c.

Referenced by pipe_read(), and pipe_write().

◆ piperesizefail

int piperesizefail
static

Definition at line 210 of file sys_pipe.c.

Referenced by pipespace_new().