MCPcopy Create free account
hub / github.com/F-Stack/f-stack / kqueue_fo_find

Function kqueue_fo_find

freebsd/kern/kern_event.c:1337–1354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1335}
1336
1337static struct filterops *
1338kqueue_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
1356static void
1357kqueue_fo_release(int filt)

Callers 1

kqueue_registerFunction · 0.85

Calls 2

mtx_lockFunction · 0.70
mtx_unlockFunction · 0.70

Tested by

no test coverage detected