Lines Matching refs:sigio

1170 sigiofree(struct sigio *sigio)  in sigiofree()  argument
1172 crfree(sigio->sio_ucred); in sigiofree()
1173 free(sigio, M_SIGIO); in sigiofree()
1176 static struct sigio *
1177 funsetown_locked(struct sigio *sigio) in funsetown_locked() argument
1184 if (sigio == NULL) in funsetown_locked()
1186 *sigio->sio_myref = NULL; in funsetown_locked()
1187 if (sigio->sio_pgid < 0) { in funsetown_locked()
1188 pg = sigio->sio_pgrp; in funsetown_locked()
1190 SLIST_REMOVE(&pg->pg_sigiolst, sigio, sigio, sio_pgsigio); in funsetown_locked()
1193 p = sigio->sio_proc; in funsetown_locked()
1195 SLIST_REMOVE(&p->p_sigiolst, sigio, sigio, sio_pgsigio); in funsetown_locked()
1198 return (sigio); in funsetown_locked()
1207 funsetown(struct sigio **sigiop) in funsetown()
1209 struct sigio *sigio; in funsetown() local
1216 sigio = funsetown_locked(*sigiop); in funsetown()
1218 if (sigio != NULL) in funsetown()
1219 sigiofree(sigio); in funsetown()
1233 struct sigio *sigio, *tmp; in funsetownlst() local
1236 sigio = SLIST_FIRST(sigiolst); in funsetownlst()
1237 if (sigio == NULL) in funsetownlst()
1244 sigio = SLIST_FIRST(sigiolst); in funsetownlst()
1245 if (sigio == NULL) { in funsetownlst()
1253 if (sigio->sio_pgid < 0) { in funsetownlst()
1254 pg = sigio->sio_pgrp; in funsetownlst()
1258 p = sigio->sio_proc; in funsetownlst()
1264 SLIST_FOREACH(sigio, sigiolst, sio_pgsigio) { in funsetownlst()
1265 *sigio->sio_myref = NULL; in funsetownlst()
1267 KASSERT(sigio->sio_pgid < 0, in funsetownlst()
1269 KASSERT(sigio->sio_pgrp == pg, in funsetownlst()
1272 KASSERT(sigio->sio_pgid > 0, in funsetownlst()
1274 KASSERT(sigio->sio_proc == p, in funsetownlst()
1285 SLIST_FOREACH_SAFE(sigio, sigiolst, sio_pgsigio, tmp) in funsetownlst()
1286 sigiofree(sigio); in funsetownlst()
1296 fsetown(pid_t pgid, struct sigio **sigiop) in fsetown()
1300 struct sigio *osigio, *sigio; in fsetown() local
1308 sigio = malloc(sizeof(struct sigio), M_SIGIO, M_WAITOK); in fsetown()
1309 sigio->sio_pgid = pgid; in fsetown()
1310 sigio->sio_ucred = crhold(curthread->td_ucred); in fsetown()
1311 sigio->sio_myref = sigiop; in fsetown()
1335 sigio->sio_proc = proc; in fsetown()
1336 SLIST_INSERT_HEAD(&proc->p_sigiolst, sigio, in fsetown()
1360 sigio->sio_pgrp = pgrp; in fsetown()
1361 SLIST_INSERT_HEAD(&pgrp->pg_sigiolst, sigio, in fsetown()
1369 *sigiop = sigio; in fsetown()
1380 fgetown(struct sigio **sigiop) in fgetown()