| 906 | } |
| 907 | |
| 908 | static bool pp_spill_active(const extract_ctx_t *ec) { |
| 909 | /* The atomic gates the pointer, not the other way round. pp_spill_enter |
| 910 | * assigns ec->pctx->spill under spill_mu and only THEN release-stores |
| 911 | * spill_mode, so a reader that has acquired a non-zero spill_mode is |
| 912 | * guaranteed to see the finished pointer. Testing the pointer first read it |
| 913 | * with no synchronisation at all while another worker was publishing it — |
| 914 | * a genuine data race on an 8-byte write, which TSan caught at |
| 915 | * pass_parallel.c:817 against this line. Short-circuit order is load |
| 916 | * bearing here; do not reorder these terms. */ |
| 917 | return ec->pctx && atomic_load_explicit(&ec->pctx->spill_mode, memory_order_acquire) != 0 && |
| 918 | ec->pctx->spill; |
| 919 | } |
| 920 | |
| 921 | CBMFileResult *cbm_pipeline_result_acquire(const cbm_pipeline_ctx_t *ctx, CBMFileResult **cache, |
| 922 | int i, cbm_result_want_fn want, bool *loaded) { |
no outgoing calls
no test coverage detected