#include <miscfs/fifofs/fifo.h>

miscfs/fifofs/fifo.h Kernel.framework

23 macros · 11 functions

functionfifo_ebadf

int fifo_ebadf(void *)
Prototypes for fifo operations on vnodes.

macrofifo_nullop

#define fifo_nullop (void (*)(void))nullop

macrofifo_create

#define fifo_create (int (*) (struct  vnop_create_args *))err_create

macrofifo_mknod

#define fifo_mknod (int (*) (struct  vnop_mknod_args *))err_mknod

macrofifo_access

#define fifo_access (int (*) (struct  vnop_access_args *))fifo_ebadf

macrofifo_getattr

#define fifo_getattr (int (*) (struct  vnop_getattr_args *))fifo_ebadf

macrofifo_setattr

#define fifo_setattr (int (*) (struct  vnop_setattr_args *))fifo_ebadf

macrofifo_revoke

#define fifo_revoke nop_revoke

macrofifo_mmap

#define fifo_mmap (int (*) (struct  vnop_mmap_args *))err_mmap

macrofifo_fsync

#define fifo_fsync (int (*) (struct  vnop_fsync_args *))fifo_nullop

macrofifo_remove

#define fifo_remove (int (*) (struct  vnop_remove_args *))err_remove

macrofifo_rename

#define fifo_rename (int (*) (struct  vnop_rename_args *))err_rename

macrofifo_mkdir

#define fifo_mkdir (int (*) (struct  vnop_mkdir_args *))err_mkdir

macrofifo_rmdir

#define fifo_rmdir (int (*) (struct  vnop_rmdir_args *))err_rmdir

macrofifo_readdir

#define fifo_readdir (int (*) (struct  vnop_readdir_args *))err_readdir

macrofifo_reclaim

#define fifo_reclaim (int (*) (struct  vnop_reclaim_args *))fifo_nullop

macrofifo_strategy

#define fifo_strategy (int (*) (struct  vnop_strategy_args *))err_strategy

macrofifo_valloc

#define fifo_valloc (int (*) (struct  vnop_valloc_args *))err_valloc

macrofifo_vfree

#define fifo_vfree (int (*) (struct  vnop_vfree_args *))err_vfree

macrofifo_bwrite

#define fifo_bwrite (int (*) (struct  vnop_bwrite_args *))fifo_nullop

macrofifo_blktooff

#define fifo_blktooff (int (*) (struct vnop_blktooff_args *))err_blktooff

functionfifo_lookup

int fifo_lookup(struct vnop_lookup_args *)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu bsd/miscfs/fifofs/fifo_vnops.c
Implements the lookup vnode operation (VNOP_LOOKUP) for FIFO vnodes. Trivial routine that always fails: sets *a_vpp to NULL and returns ENOTDIR, since a FIFO is not a directory and contains no entries.

functionfifo_open

int fifo_open(struct vnop_open_args *)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu bsd/miscfs/fifofs/fifo_vnops.c
Implements the open vnode operation (VNOP_OPEN) for FIFOs. Sets up a new instance of a fifo or finds an active one: on first open, creates a connected pair of AF_LOCAL stream sockets serving as the read and write endpoints, recorded in the vnode's fifoinfo. Increments the reader or writer count according to a_mode and wakes any openers blocked on the other end. A blocking open for reading sleeps until a writer appears; a blocking open for writing sleeps until a reader appears; a nonblocking (O_NONBLOCK) open for writing fails with ENXIO if no reader is present. An interrupted sleep undoes the open and returns the msleep error.

functionfifo_close

int fifo_close(struct vnop_close_args *)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu bsd/miscfs/fifofs/fifo_vnops.c
Implements the close vnode operation (VNOP_CLOSE) for FIFOs. Decrements the fifo's reader and/or writer count according to a_fflag; when the last reader closes, further sends are disallowed on the write socket (socantsendmore), and when the last writer closes, the read socket is marked so readers see EOF (socantrcvmore). When both counts drop to zero, both underlying sockets are closed via soclose and the fifo reverts to the uncreated state; the first soclose error, if any, is returned.

functionfifo_read

int fifo_read(struct vnop_read_args *)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu bsd/miscfs/fifofs/fifo_vnops.c
Implements the read vnode operation (VNOP_READ) for FIFOs. Receives data from the fifo's read socket via soreceive; IO_NDELAY in a_ioflag maps to a nonblocking (MSG_NBIO) receive. For POSIX conformance, if no writers are open and the receive buffer is empty the call returns 0 (EOF) rather than blocking. Posts a vnode knote event after a successful transfer and clears the socket's cannot-receive-more state when a read returns no data, so EOF is indicated only once.

functionfifo_write

int fifo_write(struct vnop_write_args *)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu bsd/miscfs/fifofs/fifo_vnops.c
Implements the write vnode operation (VNOP_WRITE) for FIFOs. Sends the uio data to the fifo's write socket via sosend, passing MSG_NBIO when IO_NDELAY is set in a_ioflag. Posts a vnode knote event on success, and also on a partial nonblocking write that stopped with EWOULDBLOCK because the fifo buffer filled. Returns the sosend error.

functionfifo_ioctl

int fifo_ioctl(struct vnop_ioctl_args *)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu bsd/miscfs/fifofs/fifo_vnops.c
Implements the ioctl vnode operation (VNOP_IOCTL) for FIFOs. FIONBIO is accepted and ignored (returns 0). Other commands are forwarded through soo_ioctl to the fifo's underlying sockets using a temporary fileproc: to the read socket if FREAD is set in a_fflag and to the write socket if FWRITE is set, returning the first error.

functionfifo_select

int fifo_select(struct vnop_select_args *)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu bsd/miscfs/fifofs/fifo_vnops.c
Implements the select vnode operation (VNOP_SELECT) for FIFOs. Forwards the poll through soo_select to the fifo's read socket when FREAD is set in a_which and to the write socket when FWRITE is set, using a temporary fileproc. Returns nonzero as soon as either socket reports ready, 0 otherwise.

functionfifo_inactive

int fifo_inactive(struct vnop_inactive_args *)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu bsd/miscfs/fifofs/fifo_vnops.c
Implements the inactive vnode operation (VNOP_INACTIVE) for FIFOs. Nothing to do; returns 0.

functionfifo_pathconf

int fifo_pathconf(struct vnop_pathconf_args *)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu bsd/miscfs/fifofs/fifo_vnops.c
Implements the pathconf vnode operation (VNOP_PATHCONF) for FIFOs. Returns POSIX pathconf information applicable to fifos: _PC_LINK_MAX LINK_MAX _PC_PIPE_BUF PIPE_BUF _PC_CHOWN_RESTRICTED 200112 (_POSIX_CHOWN_RESTRICTED) All other names return EINVAL.

functionfifo_advlock

int fifo_advlock(struct vnop_advlock_args *)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu bsd/miscfs/fifofs/fifo_vnops.c
Implements the advisory-lock vnode operation (VNOP_ADVLOCK) for FIFOs. Advisory byte-range locking is not supported on fifos; always returns ENOTSUP.