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

Function ccp_bitmap_set

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

Source from the content-addressed store, hash-verified

161}
162
163static void
164ccp_bitmap_set(unsigned long *map, unsigned int start, int len)
165{
166 unsigned long *p = map + WORD_OFFSET(start);
167 const unsigned int size = start + len;
168 int bits_to_set = BITS_PER_WORD - (start % BITS_PER_WORD);
169 unsigned long mask_to_set = CCP_BITMAP_FIRST_WORD_MASK(start);
170
171 while (len - bits_to_set >= 0) {
172 *p |= mask_to_set;
173 len -= bits_to_set;
174 bits_to_set = BITS_PER_WORD;
175 mask_to_set = ~0UL;
176 p++;
177 }
178 if (len) {
179 mask_to_set &= CCP_BITMAP_LAST_WORD_MASK(size);
180 *p |= mask_to_set;
181 }
182}
183
184static void
185ccp_bitmap_clear(unsigned long *map, unsigned int start, int len)

Callers 2

ccp_lsb_allocFunction · 0.85
ccp_assign_lsbsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected