Documentation

Miri.Interpreter.ThreadLoops

Scheduler-facing split callback protocol. The taken closure owns its actual TLS stage; invocation stores its mutated stage only on success, and restoration is checked in the thread selected after the callback.

def Miri.Interpreter.ThreadLoops.take {U C O X F A Aff : Type} (h : ThreadTlsMachine.Hooks U C O X F A Aff) :

Origin reset precedes callback take, including on missing callback errors. The registry copy is moved out with the callback, preventing reentry.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    def Miri.Interpreter.ThreadLoops.invoke {U C O X F A Aff : Type} (h : ThreadTlsMachine.Hooks U C O X F A Aff) (choice : C) (callback : TakenTls) :

    No callback take or thread switching occurs here. The source engine may schedule a real destructor frame; errors retain its latest canonical state and do not restore the closure.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def Miri.Interpreter.ThreadLoops.restore {U C O X F A Aff : Type} (h : ThreadTlsMachine.Hooks U C O X F A Aff) (callback : TakenTls) :

      Source getter selects the thread active after callback execution. Restore assigns Some(callback), matching the unconditional source assignment.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        def Miri.Interpreter.ThreadLoops.bind {U C O X F A Aff Payload : Type} (h : ThreadTerminationMachine.Hooks U C O X F A Aff Payload) (base : RunLoopHooks (State U) C TakenTls) :

        Scheduler and core-step remain the actual caller dictionaries; TLS taking, invocation, checked restoration, and normal/for_exit termination are closed.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Coherent actual scheduler/core-step/stack lifecycle composition. Host I/O, deadline service and permitted scheduling choices remain the scheduler's real required leaves, rather than replacement scheduling tokens.

          Equations
          Instances For
            def Miri.Interpreter.ThreadLoops.iteration {U C O X F A Aff Payload : Type} (h : ThreadTerminationMachine.Hooks U C O X F A Aff Payload) (base : RunLoopHooks (State U) C TakenTls) (scheduler : C → ThreadStacks.LocalSchedulerHooks Memory.MiriMemoryKind U) (choice : C) (state : State U) :

            Execute one real source scheduler iteration with the closed TLS lifecycle.

            Equations
            Instances For