| 310 | |
| 311 | #ifdef DIAGNOSTIC |
| 312 | static void |
| 313 | rangeset_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" |
no test coverage detected