| 310 | } |
| 311 | |
| 312 | static bool gic_preflight(cbm_ignore_checked_t *owner, const cbm_ignore_program_t *program, |
| 313 | const cbm_ignore_program_t *foreign, unsigned kind) { |
| 314 | cbm_ignore_checked_usage_t before, after; |
| 315 | if (!cbm_ignore_checked_usage(owner, &before)) |
| 316 | return false; |
| 317 | cbm_ignore_checked_control_t control = gic_control(); |
| 318 | gic_counter counter = {0}; |
| 319 | control.cancelled = gic_cancel; |
| 320 | control.context = &counter; |
| 321 | cbm_ignore_checked_error_t error; |
| 322 | cbm_ignore_checked_status_t status; |
| 323 | bool cleared = |
| 324 | kind < 5 ? gic_invalid_parse_call(owner, program, kind, &control, &error, &status) |
| 325 | : gic_invalid_match_call(owner, program, foreign, kind, &control, &error, &status); |
| 326 | return cleared && gic_status(status, CBM_IGNORE_CHECKED_INVALID, &error) && |
| 327 | counter.calls == 0 && cbm_ignore_checked_usage(owner, &after) && |
| 328 | gic_usage_equal(&before, &after); |
| 329 | } |
| 330 | |
| 331 | static bool gic_invalid_open(unsigned kind) { |
| 332 | cbm_ignore_checked_limits_t limits = gic_limits(); |
no test coverage detected