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

Function bit_nclear

freebsd/sys/bitstring.h:178–194  ·  view source on GitHub ↗

Clear bits start ... stop inclusive in bit string. */

Source from the content-addressed store, hash-verified

176
177/* Clear bits start ... stop inclusive in bit string. */
178static inline void
179bit_nclear(bitstr_t *_bitstr, int _start, int _stop)
180{
181 bitstr_t *_stopbitstr;
182
183 _stopbitstr = _bitstr + _bit_idx(_stop);
184 _bitstr += _bit_idx(_start);
185
186 if (_bitstr == _stopbitstr) {
187 *_bitstr &= ~_bit_make_mask(_start, _stop);
188 } else {
189 *_bitstr &= ~_bit_make_mask(_start, _BITSTR_BITS - 1);
190 while (++_bitstr < _stopbitstr)
191 *_bitstr = 0;
192 *_stopbitstr &= ~_bit_make_mask(0, _stop);
193 }
194}
195
196/* Find the first bit set in bit string at or after bit start. */
197static inline void

Callers 3

pmap_reset_asid_setFunction · 0.85
optimize_unrFunction · 0.85
iflib_fl_setupFunction · 0.85

Calls 2

_bit_idxFunction · 0.85
_bit_make_maskFunction · 0.85

Tested by

no test coverage detected