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