| 1335 | } |
| 1336 | |
| 1337 | static struct filterops * |
| 1338 | kqueue_fo_find(int filt) |
| 1339 | { |
| 1340 | |
| 1341 | if (filt > 0 || filt + EVFILT_SYSCOUNT < 0) |
| 1342 | return NULL; |
| 1343 | |
| 1344 | if (sysfilt_ops[~filt].for_nolock) |
| 1345 | return sysfilt_ops[~filt].for_fop; |
| 1346 | |
| 1347 | mtx_lock(&filterops_lock); |
| 1348 | sysfilt_ops[~filt].for_refcnt++; |
| 1349 | if (sysfilt_ops[~filt].for_fop == NULL) |
| 1350 | sysfilt_ops[~filt].for_fop = &null_filtops; |
| 1351 | mtx_unlock(&filterops_lock); |
| 1352 | |
| 1353 | return sysfilt_ops[~filt].for_fop; |
| 1354 | } |
| 1355 | |
| 1356 | static void |
| 1357 | kqueue_fo_release(int filt) |
no test coverage detected