Lines Matching refs:filt
116 static const struct filterops *kqueue_fo_find(int filt);
117 static void kqueue_fo_release(int filt);
1401 kqueue_add_filteropts(int filt, const struct filterops *filtops)
1406 if (filt > 0 || filt + EVFILT_SYSCOUNT < 0) {
1409 ~filt, EVFILT_SYSCOUNT);
1413 if (sysfilt_ops[~filt].for_fop != &null_filtops &&
1414 sysfilt_ops[~filt].for_fop != NULL)
1417 sysfilt_ops[~filt].for_fop = filtops;
1418 sysfilt_ops[~filt].for_refcnt = 0;
1426 kqueue_del_filteropts(int filt)
1431 if (filt > 0 || filt + EVFILT_SYSCOUNT < 0)
1435 if (sysfilt_ops[~filt].for_fop == &null_filtops ||
1436 sysfilt_ops[~filt].for_fop == NULL)
1438 else if (sysfilt_ops[~filt].for_refcnt != 0)
1441 sysfilt_ops[~filt].for_fop = &null_filtops;
1442 sysfilt_ops[~filt].for_refcnt = 0;
1450 kqueue_fo_find(int filt)
1453 if (filt > 0 || filt + EVFILT_SYSCOUNT < 0)
1456 if (sysfilt_ops[~filt].for_nolock)
1457 return sysfilt_ops[~filt].for_fop;
1460 sysfilt_ops[~filt].for_refcnt++;
1461 if (sysfilt_ops[~filt].for_fop == NULL)
1462 sysfilt_ops[~filt].for_fop = &null_filtops;
1465 return sysfilt_ops[~filt].for_fop;
1469 kqueue_fo_release(int filt)
1472 if (filt > 0 || filt + EVFILT_SYSCOUNT < 0)
1475 if (sysfilt_ops[~filt].for_nolock)
1479 KASSERT(sysfilt_ops[~filt].for_refcnt > 0,
1481 sysfilt_ops[~filt].for_refcnt--;
1496 int error, filt, event;
1509 filt = kev->filter;
1510 fops = kqueue_fo_find(filt);
1754 kqueue_fo_release(filt);