Deadline sweep and timeout callback protocol #
This follows ThreadManager::unblock_expired_deadlines in thread.rs.
Host-clock reads are supplied as exact per-thread remaining durations; this
module does not invent a clock or unit. It performs the source's full sweep
before invoking timeout callbacks, keeps the minimum positive wait, and then
exposes callback execution in thread-index order. A callback failure retains
the mutated manager and stops the remaining callbacks, matching ? before
active-thread restoration.
Exact result of Miri's host clock subtraction for one blocked thread. A zero duration means the deadline has expired.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- realTimeTimeoutInIsolation (thread : ThreadId) : DeadlineSweepError
- missingObservation (thread : ThreadId) : DeadlineSweepError
- duplicateObservations (thread : ThreadId) : DeadlineSweepError
- threadIdOverflow (index : Nat) : DeadlineSweepError
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- thread : ThreadId
- reason : BlockReason
- callbackToken : Nat
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
The source mutates expired thread states during the sweep, before it
starts calling any callbacks. outcome retains a source assertion or missing
environment fact together with those prior mutations.
- manager : ThreadManager
- callbacks : List DeadlineCallback
- outcome : Option DeadlineSweepError
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Run the source's thread-index-ordered sweep. The observation list must contain the actual clock subtraction for each blocked deadline.
Equations
- One or more equations did not get rendered due to their size.
Instances For
- sweepFailed (error : DeadlineSweepError) : DeadlineCallbackError
- thread (error : ThreadError) : DeadlineCallbackError
- wrongCallbackKind (expected actual : UnblockKind) : DeadlineCallbackError
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- complete (manager : ThreadManager) (minimumWait : Option Nat) : DeadlineCallbackStep
- invoke (manager : ThreadManager) (obligation : UnblockCallbackObligation) (remaining : List DeadlineCallback) (minimumWait : Option Nat) : DeadlineCallbackStep
- callbackFailed (managerAfterFailure : ThreadManager) (obligation : UnblockCallbackObligation) (remaining : List DeadlineCallback) (minimumWait : Option Nat) : DeadlineCallbackStep
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Start callbacks only after a successful complete sweep. Every expired thread has already been set to Enabled.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Continue after one actual callback. A failed callback leaves its active thread selected and prevents later callbacks from running.
Equations
- One or more equations did not get rendered due to their size.