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

Function rangeset_check

freebsd/kern/subr_rangeset.c:312–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310
311#ifdef DIAGNOSTIC
312static void
313rangeset_check(struct rangeset *rs)
314{
315 struct rs_el *r, *rp;
316 uint64_t cursor, *r1;
317
318 for (cursor = 0, rp = NULL;; cursor = r->re_start + 1, rp = r) {
319 r1 = pctrie_lookup_ge(&rs->rs_trie, cursor);
320 if (r1 == NULL)
321 break;
322 r = __containerof(r1, struct rs_el, re_start);
323 KASSERT(r->re_start < r->re_end,
324 ("invalid interval rs %p elem %p (%#jx, %#jx)",
325 rs, r, (uintmax_t)r->re_start, (uintmax_t)r->re_end));
326 if (rp != NULL) {
327 KASSERT(rp->re_end <= r->re_start,
328 ("non-ascending neighbors rs %p "
329 "prev elem %p (%#jx, %#jx) elem %p (%#jx, %#jx)",
330 rs, rp, (uintmax_t)rp->re_start,
331 (uintmax_t)rp->re_end, r, (uintmax_t)r->re_start,
332 (uintmax_t)r->re_end));
333 }
334 }
335}
336#endif
337
338#include "opt_ddb.h"

Callers 6

rangeset_finiFunction · 0.85
rangeset_check_emptyFunction · 0.85
rangeset_insertFunction · 0.85
rangeset_remove_predFunction · 0.85
rangeset_lookupFunction · 0.85
rangeset_copyFunction · 0.85

Calls 1

pctrie_lookup_geFunction · 0.85

Tested by

no test coverage detected