GuardState

private class GuardState

One lane-thread's watchdog state — everything except that lane's ABI kill-id field.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Link copied to clipboard

The generation whose budget the watchdog spent, or -1 (never a live generation). Compared for EQUALITY against gen, so a write from a body armed for an older frame carries that older number and reads as "not tripped" all by itself — which is what makes a watchdog racing a concurrent disarm a non-event.

Link copied to clipboard
var depth: Int

Frame nesting, so endFrame can tell an inner frame from the outermost one.

Link copied to clipboard

Frame generation, bumped on every arm and disarm. Lane thread is the sole writer, so ++ needs no atomic. Only ever compared for equality, so wrap is a non-event.

Link copied to clipboard

Which eval is on this lane's stack right now, or 0. Changed only under this state's monitor, which is what pairs a step boundary with arm's kill write; volatile for the one read taken outside it.

Link copied to clipboard

Lane thread only, like depth — never read off-lane, so plain fields.