Protect debug print output with spinlock
All checks were successful
Builds / ExectOS (amd64, debug) (push) Successful in -59m28s
Builds / ExectOS (amd64, release) (push) Successful in -59m30s
Builds / ExectOS (i686, release) (push) Successful in -59m29s
Builds / ExectOS (i686, debug) (push) Successful in -59m27s

This commit is contained in:
2026-05-13 14:33:41 +02:00
parent 757eac08c6
commit fd7e18989d
4 changed files with 17 additions and 6 deletions

View File

@@ -33,7 +33,7 @@ KD::DebugIo::DbgPrint(PCWSTR Format,
VA_START(Arguments, Format);
/* Call the actual debug print routine */
DbgPrintEx(Format, Arguments);
DbgPrint(Format, Arguments);
/* Clean up the va_list */
VA_END(Arguments);
@@ -54,12 +54,16 @@ KD::DebugIo::DbgPrint(PCWSTR Format,
*/
XTCDECL
VOID
KD::DebugIo::DbgPrintEx(PCWSTR Format,
VA_LIST Arguments)
KD::DebugIo::DbgPrint(PCWSTR Format,
VA_LIST Arguments)
{
PLIST_ENTRY DispatchTableEntry;
PKD_DISPATCH_TABLE DispatchTable;
/* Raise runlevel and acquire the Debug I/O lock */
KE::RaiseRunLevel RunLevel(HIGH_LEVEL);
KE::SpinLockGuard SpinLock(&DebugIoLock);
/* Iterate over all registered debug providers */
DispatchTableEntry = Providers.Flink;
while(DispatchTableEntry != &Providers)
@@ -218,6 +222,9 @@ KD::DebugIo::InitializeDebugIoProviders(VOID)
ULONG Index;
XTSTATUS ProviderStatus, Status;
/* Initialize debug I/O spinlock */
KE::SpinLock::InitializeSpinLock(&DebugIoLock);
/* Initialize debug providers list */
RTL::LinkedList::InitializeListHead(&Providers);