Lifecycle management of threads #29

Merged
harraiken merged 240 commits from threads into master 2026-09-07 13:45:09 +02:00
Showing only changes of commit 43265bcddb - Show all commits

View File

@@ -57,12 +57,16 @@ VOID
KD::DebugIo::DbgPrint(PCWSTR Format, KD::DebugIo::DbgPrint(PCWSTR Format,
VA_LIST Arguments) VA_LIST Arguments)
{ {
PLIST_ENTRY DispatchTableEntry;
PKD_DISPATCH_TABLE DispatchTable; PKD_DISPATCH_TABLE DispatchTable;
PLIST_ENTRY DispatchTableEntry;
BOOLEAN BypassLocks;
/* Raise runlevel and acquire the Debug I/O lock */ /* Evaluate if the system is currently in a critical or debugging state */
KE::RaiseRunLevel RunLevel(HIGH_LEVEL); BypassLocks = (KE::Crash::SystemCrashed() || KD::Debugger::DebuggerActive());
KE::SpinLockGuard SpinLock(&DebugIoLock);
/* Conditionally raise runlevel and acquire the Debug I/O lock */
KE::RaiseRunLevel RunLevel(HIGH_LEVEL, !BypassLocks);
KE::SpinLockGuard SpinLock(&DebugIoLock, !BypassLocks);
/* Iterate over all registered debug providers */ /* Iterate over all registered debug providers */
DispatchTableEntry = Providers.Flink; DispatchTableEntry = Providers.Flink;