poll
Fil-C also pollcheck, safepoint, poll edge
Upstream safepoints, filc_runtime.c
A safepoint is a point where the thread may run signal handlers and answer the collector. The collector frees nothing the program can name there, but a handler the program installed may free an object under the rest of the program. A pollcheck is a safepoint on an edge: a jump target pollL, a poll edge, runs one before going to L. Calls, allocations and some helpers are safepoints too (ir:evidence_preserving/1, ir:polls_every_cycle/1).
Upstream puts a pollcheck on every back edge of the control-flow graph, not only on loops. A thread about to block in a system call first exits, and the collector does its handshake work for it (FUGC).
Every cycle of a checked function has a poll edge, so a loop cannot keep the collector waiting (
polls_every_cycle).No live fact crosses a safepoint, with three exceptions, covered by spares, which every runtime meets (
spares_any).Rocq: the target
Poll; the runtime acts only before an instruction whereat_safepointholds or before a poll edge (safepoint_due), as its axiomsafepointssays, and there it changes no region (collector_live). The model has no handler: installing one is a call to an external with no contract, which ends the run.
Linked from
- Ahead.v: exit_in
- Buffer.v: buffer_module
- Buffer.v: buffer_safepoint
- Cfg.v: jump_succs
- Chain.v: run_access_checked
- Cycle.v: cycle_safepoint
- Doomed.v: ahead_holds
- Doomed.v: doomed_mem
- Doomed.v: exit_targets
- Doomed.v: run_doomed_checked
- ExternalMachine.v: external_core_safepoint
- ExternalMachine.v: external_site_stuck
- ExternalMachine.v: invalid_site_can_poll
- FUGC
- Guard.v: run_guard_checked
- Heap.v: pval
- How Fil-C works: Safepoints
- How Iris works: Invariants
- How Iris works: The machine as a language
- Invariant.v: edge_step_next'
- Invariant.v: jump_claim
- Invariant.v: spares
- IrTerm.v: enc_target
- Language.v: head_step
- Language.v: safepoint_due_callers
- ListSum.v: ls_module
- Logic.v: SafepointStable
- Logic.v: cell_bounds
- Machine.v: cases
- Machine.v: safepoint_due
- Memory.v: reason
- NFB guide (Argon): The 4-word file header
- NFB guide (Wonder): 7.1 What changes
- NFB guide (Wonderful): 6. What Fil-C guarantees, in one page
- Panics.v: never_panics
- Panics.v: never_panics_by_invariant
- Persistence.v: hull_case
- Persistence.v: safepoint_inv
- Pieces.v: piece
- Pizlonate.v: is_atom
- Renew.v: run_reuse_checked
- Runtime.v: Runtime
- Runtime.v: lifetime_step
- Runtime.v: safepoint
- Semantics.v: edge_step
- Sep.v: fp
- Single.v: mem_sinv
- Soundness.v: unchecked_op
- Soundness.v: valid_no_unchecked
- Sum.v: mem_ok_safepoint
- Sum.v: sum_module
- Syntax.v: class
- Syntax.v: evidence_preserving
- Syntax.v: target
- Transport.v: dtarget
- Validate.v: ahead_edge
- Validate.v: checked_jump
- Validate.v: evidence_pass
- Validate.v: incoming
- Validate.v: is_poll
- Validate.v: polls_every_cycle
- Validate.v: succ_labels
- Walk.v: edge_set
- adequacy
- alloc
- block
- concurrent separation logic
- getter
- later modality
- live
- root
- runtime
- state interpretation
- the formal campaign: The claims, kept apart
- the guide: Safepoints and GC roots