MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / pp_spill_active

Function pp_spill_active

src/pipeline/pass_parallel.c:908–919  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

906}
907
908static 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
921CBMFileResult *cbm_pipeline_result_acquire(const cbm_pipeline_ctx_t *ctx, CBMFileResult **cache,
922 int i, cbm_result_want_fn want, bool *loaded) {

Callers 5

pp_spill_sweepFunction · 0.85
pp_charge_probeFunction · 0.85
extract_workerFunction · 0.85
cbm_parallel_extract_exFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected