Documentation

Miri.Interpreter.ThreadExit

Pinned concurrency/thread.rs::terminate_active_thread (756-824) and unblock_thread (849-867). This executes cleanup and callbacks, preserving all prior memory/hook/manager effects on failure. TLS map removal precedes frees; race termination follows all frees; joiners are discovered afterward.

inductive Miri.Interpreter.ThreadExitError (LeafError : Type) :
Instances For
    def Miri.Interpreter.instReprThreadExitError.repr {LeafError✝ : Type} [Repr LeafError✝] :
    ThreadExitError LeafError✝ → Nat → Std.Format
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[instance_reducible]
      instance Miri.Interpreter.instReprThreadExitError {LeafError✝ : Type} [Repr LeafError✝] :
      Repr (ThreadExitError LeafError✝)
      Equations
      Instances For
        @[reducible, inline]
        abbrev Miri.Interpreter.ThreadExitM (P E H Error A : Type) :
        Equations
        Instances For
          structure Miri.Interpreter.ThreadExitQueries (P E H ProvExtra Error : Type) :
          Instances For
            def Miri.Interpreter.terminateActiveThread {P E H ProvExtra Error : Type} [Memory.PointerProvenance P] (queries : ThreadExitQueries P E H ProvExtra Error) (forExit : Bool) :
            ThreadExitM P E H Error Unit

            Call only after the stack-empty callback actually returned Ready. The callback itself is orchestrated by the TLS destructor state machine.

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