From 062752e1a7e70c3590dd498c9d61392c33be0de2 Mon Sep 17 00:00:00 2001 From: ergo720 <45463469+ergo720@users.noreply.github.com> Date: Thu, 2 Mar 2023 22:53:18 +0100 Subject: [PATCH] Review remarks --- src/core/kernel/exports/EmuKrnlKe.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/kernel/exports/EmuKrnlKe.cpp b/src/core/kernel/exports/EmuKrnlKe.cpp index 3300b8587..8bbfbc8d5 100644 --- a/src/core/kernel/exports/EmuKrnlKe.cpp +++ b/src/core/kernel/exports/EmuKrnlKe.cpp @@ -1268,7 +1268,7 @@ XBSYSAPI EXPORTNUM(119) xbox::boolean_xt NTAPI xbox::KeInsertQueueDpc InsertTailList(&(g_DpcData.DpcQueue), &(Dpc->DpcListEntry)); // TODO : Instead of DpcQueue, add the DPC to KeGetCurrentPrcb()->DpcListHead // Signal the Dpc handling code there's work to do - if (g_DpcData.IsDpcActive.test() == false) { + if (!IsDpcActive()) { HalRequestSoftwareInterrupt(DISPATCH_LEVEL); } // OpenXbox has this instead: @@ -1291,11 +1291,12 @@ XBSYSAPI EXPORTNUM(121) xbox::boolean_xt NTAPI xbox::KeIsExecutingDpc { LOG_FUNC(); - // This is the correct implementation, but it doesn't work because our Prcb is per-thread instead of being per-processor #if 0 + // This is the correct implementation, but it doesn't work because our Prcb is per-thread instead of being per-processor BOOLEAN ret = (BOOLEAN)KeGetCurrentPrcb()->DpcRoutineActive; -#endif +#else BOOLEAN ret = (BOOLEAN)IsDpcActive(); +#endif RETURN(ret); }