edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
| 1 | //! Test-only fault injection for the threaded decode (lane-av1panichang). |
| 2 | //! |
| 3 | //! A worker calls [`point`] at a named site; once [`arm`]ed, the `nth` time |
| 4 | //! that site is reached it panics, and the plan disarms itself. Disarmed (the |
| 5 | //! default) a point is one relaxed atomic load. Hidden from the docs: it exists |
| 6 | //! so `tests/worker_panic.rs` can prove a panicking worker never hangs the |
| 7 | //! decode and that the next decode in the same process still works. |
| 8 | |
| 9 | use Mutex; |
| 10 | use ; |
| 11 | |
| 12 | static ARMED: AtomicBool = new; |
| 13 | static PLAN: = new; |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | /// Panics the `nth` (1-based) time a worker reaches `site`, once. |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | /// Clears any armed plan. |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | /// The sites a worker reports: `frame` (inside a frame job's own catch), |
| 36 | /// `frame-after` (past it, unwinding through the job), `recon` (a wavefront |
| 37 | /// job). |
| 38 | pub |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 |