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

Function ff_bitmap_next_set

adapter/syscall/ff_hook_syscall.c:291–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289}
290
291static inline fd_mask
292ff_bitmap_next_set(fd_mask *ai, fd_mask i, int set_words)
293{
294 fd_mask i0 = i / NFDBITS;
295 fd_mask i1 = i % NFDBITS;
296 fd_mask t;
297
298 if (i0 < set_words) {
299 t = (ai[i0] >> i1) << i1;
300
301 if (t) {
302 return count_trailing_zeros(t) + i0 * NFDBITS;
303 }
304
305 for (i0++; i0 < set_words; i0++) {
306 t = ai[i0];
307 if (t) {
308 return count_trailing_zeros(t) + i0 * NFDBITS;
309 }
310 }
311 }
312
313 return ~0;
314}
315
316int
317fstack_territory(int domain, int type, int protocol)

Callers 1

ff_hook_selectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected