| 741 | } |
| 742 | |
| 743 | static bool gic_cancel_sweep(const gic_long_input *input, bool parsing) { |
| 744 | gic_observation normal = {0}; |
| 745 | if (!gic_long_run(input, parsing, 0, &normal) || normal.cancelled || normal.work <= 4096 || |
| 746 | !normal.polls || normal.polls >= SIZE_MAX - 1) |
| 747 | return false; |
| 748 | const size_t stops[] = {1, normal.polls / 2 + 1, normal.polls, normal.polls + 1}; |
| 749 | bool cancelled = false; |
| 750 | for (size_t i = 0; i < 4; i++) { |
| 751 | gic_observation sample = {0}; |
| 752 | if (!gic_long_run(input, parsing, stops[i], &sample)) |
| 753 | return false; |
| 754 | cancelled = cancelled || sample.cancelled; |
| 755 | } |
| 756 | return cancelled; |
| 757 | } |
| 758 | |
| 759 | static bool gic_expired(cbm_ignore_checked_t *owner, const cbm_ignore_program_t *program, |
| 760 | bool parsing) { |
no test coverage detected