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

Function ccp_find_first_zero_bit

dpdk/drivers/crypto/ccp/ccp_dev.c:147–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147static inline uint32_t
148ccp_find_first_zero_bit(unsigned long *addr, uint32_t limit)
149{
150 uint32_t i;
151 uint32_t nwords = 0;
152
153 nwords = (limit - 1) / BITS_PER_WORD + 1;
154 for (i = 0; i < nwords; i++) {
155 if (addr[i] == 0UL)
156 return i * BITS_PER_WORD;
157 if (addr[i] < ~(0UL))
158 break;
159 }
160 return (i == nwords) ? limit : i * BITS_PER_WORD + ccp_ffz(addr[i]);
161}
162
163static void
164ccp_bitmap_set(unsigned long *map, unsigned int start, int len)

Callers 1

ccp_assign_lsbsFunction · 0.85

Calls 1

ccp_ffzFunction · 0.85

Tested by

no test coverage detected