| 384 | } |
| 385 | |
| 386 | static bool timer_list_check(const struct list_head *l, |
| 387 | uint64_t min, uint64_t max, uint64_t first, |
| 388 | const char *abortstr) |
| 389 | { |
| 390 | const struct timer *t; |
| 391 | |
| 392 | if (!list_check(l, abortstr)) |
| 393 | return false; |
| 394 | |
| 395 | list_for_each(l, t, list) { |
| 396 | if (t->time < min || t->time > max) { |
| 397 | if (abortstr) { |
| 398 | fprintf(stderr, |
| 399 | "%s: timer %p %llu not %llu-%llu\n", |
| 400 | abortstr, t, (long long)t->time, |
| 401 | (long long)min, (long long)max); |
| 402 | abort(); |
| 403 | } |
| 404 | return false; |
| 405 | } |
| 406 | if (t->time < first) { |
| 407 | if (abortstr) { |
| 408 | fprintf(stderr, |
| 409 | "%s: timer %p %llu < minimum %llu\n", |
| 410 | abortstr, t, (long long)t->time, |
| 411 | (long long)first); |
| 412 | abort(); |
| 413 | } |
| 414 | return false; |
| 415 | } |
| 416 | } |
| 417 | return true; |
| 418 | } |
| 419 | |
| 420 | struct timers *timers_check(const struct timers *timers, const char *abortstr) |
| 421 | { |
no test coverage detected