sigio
struct sigio *buf_sigio; /* Processes waiting for SIGIO */
struct sigio * ec_sigio;
struct sigio *sm_sigio;
funsetown(struct sigio **sigiop)
struct sigio *sigio;
if ((sigio = *sigiop) != NULL) {
KKASSERT(sigiop == sigio->sio_myref);
sigio = *sigiop;
if (sigio == NULL)
if (sigio->sio_pgid < 0) {
pgrp = sigio->sio_pgrp;
sigio->sio_pgrp = NULL;
SLIST_REMOVE(&pgrp->pg_sigiolst, sigio, sigio, sio_pgsigio);
p = sigio->sio_proc;
sigio->sio_proc = NULL;
SLIST_REMOVE(&p->p_sigiolst, sigio, sigio, sio_pgsigio);
crfree(sigio->sio_ucred);
sigio->sio_ucred = NULL;
kfree(sigio, M_SIGIO);
struct sigio *sigio;
while ((sigio = SLIST_FIRST(sigiolst)) != NULL)
funsetown(sigio->sio_myref);
fsetown(pid_t pgid, struct sigio **sigiop)
struct sigio *sigio;
sigio = kmalloc(sizeof(struct sigio), M_SIGIO, M_WAITOK | M_ZERO);
SLIST_INSERT_HEAD(&proc->p_sigiolst, sigio, sio_pgsigio);
sigio->sio_proc = proc;
SLIST_INSERT_HEAD(&pgrp->pg_sigiolst, sigio, sio_pgsigio);
sigio->sio_pgrp = pgrp;
sigio->sio_pgid = pgid;
sigio->sio_ucred = crhold(curthread->td_ucred);
sigio->sio_ruid = sigio->sio_ucred->cr_ruid;
sigio->sio_myref = sigiop;
*sigiop = sigio;
fgetown(struct sigio **sigiop)
struct sigio *sigio;
sigio = *sigiop;
own = (sigio != NULL ? sigio->sio_pgid : 0);
pgsigio(struct sigio *sigio, int sig, int checkctty)
if (sigio == NULL)
if (sigio->sio_pgid > 0) {
if (CANSIGIO(sigio->sio_ruid, sigio->sio_ucred,
sigio->sio_proc))
ksignal(sigio->sio_proc, sig);
} else if (sigio->sio_pgid < 0) {
struct pgrp *pg = sigio->sio_pgrp;
if (CANSIGIO(sigio->sio_ruid, sigio->sio_ucred, p) &&
struct sigio *sc_sigio; /* information for async I/O */
error = fsetown(*(int *)data, &rpb->sigio);
*(int *)data = fgetown(&rpb->sigio);
error = fsetown(-(*(int *)data), &rpb->sigio);
*(int *)data = -fgetown(&rpb->sigio);
funsetown(&rpb->sigio);
if (dosigio && (pb->state & PIPE_ASYNC) && pb->sigio) {
pgsigio(pb->sigio, SIGIO, 0);
struct sigio * bd_sigio; /* information for async I/O */
struct sigio *tap_sigtd; /* track process owning tap */
struct sigio *tap_sigio; /* information for async I/O */
struct sigio *tun_sigio; /* information for async I/O */
struct sigio *kq_sigio;
SLIST_ENTRY(sigio) sio_pgsigio; /* sigio's for process or group */
struct sigio **sio_myref; /* location of the pointer that holds */
SLIST_HEAD(sigiolst, sigio);
pid_t fgetown (struct sigio **);
int fsetown (pid_t, struct sigio **);
void funsetown (struct sigio **);
struct sigio *sigio; /* information for async I/O */
struct sigio;
void pgsigio (struct sigio *, int signum, int checkctty);
struct sigio *so_sigio; /* information for async I/O or
struct sigio *t_sigio; /* Information for async I/O. */