SchedulerThreadProc
function · core · orchestration
- Address
0x420c00· 543 bytes, up to0x420e1e- Signature
uint32_t __stdcall (uint32_t useMainSlot)- Meaning
- Runs the frame loop: sleeps until a context is due, runs its tick, reschedules or tears it down
- Confidence
- verified, proof two
- Finding
- core/loop#the-loop
Finding: The loop in core: the frame loop
0x420c00 waits for the start gate, names its thread Engine <id> and registers it. Each
iteration then restores the thread priority saved at startup, leaves the loop when the shutdown
event is set, takes the context due soonest, and sleeps on the slot's event for the time until
that context is due, or forever when none is. When the sleep ends by timeout, it runs one tick
(One tick); when it is woken early, it only reschedules. A context in run state 1 is torn down
instead of rescheduled. On exit it releases its slot, which tears down every context left in it.
The derivation is in the doc.
Callers 1
- RunMainLoop core
Callees 31
- SetThreadPropContext base
- SetThreadProp base
- ContextStart core
- ContextDestroy core
- ContextUpdateFrameTime core
- ContextTick core
- ContextAfterFrame core
- AcquireSlot core
- ReleaseSlot core
- RemoveContextLoad core
- PopDueContext core
- GetSlotEvent core
- RescheduleContext core
- StopScheduler core
- DrainWindowInput core
- IEvtQueueProcessMessages core
- IEvtTimerProcess core
- IEvtTimerTimeToNext core
- OsGetAsyncTimeMs core
- RegisterEngineThread os
- UnregisterEngineThread os
- BindNameObjectToThread os
- UnbindNameObjectFromThread os
- PollingWait os
- SStrPrintf storm
- GetCurrentThreadIdThunk unassigned
- GetCurrentThreadPriority unassigned
- SetCurrentThreadPriority unassigned
- SCritSect::Enter storm
- SCritSect::Leave storm
- SEventWait storm
Calls and jumps by a bare address, from tables/calls.tsv.