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

Function ff_bitmap_first_set

adapter/syscall/ff_hook_syscall.c:275–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273}
274
275static inline uint64_t
276ff_bitmap_first_set(fd_mask *ai, int set_words)
277{
278 fd_mask i = 0;
279
280 for (; i < set_words; i++) {
281 fd_mask x = ai[i];
282
283 if (x != 0) {
284 return i * NFDBITS + count_trailing_zeros(x);
285 }
286 }
287
288 return ~0;
289}
290
291static inline fd_mask
292ff_bitmap_next_set(fd_mask *ai, fd_mask i, int set_words)

Callers 1

ff_hook_selectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected