From 1a932468a23ba63cc0125145a582e418a3b8dda2 Mon Sep 17 00:00:00 2001 From: belliash Date: Thu, 16 Nov 2023 14:53:54 +0100 Subject: [PATCH] Add some DPC related stubs --- sdk/xtdk/kefuncs.h | 8 +++++ xtoskrnl/ke/dpc.c | 71 ++++++++++++++++++++++++++++++++---------- xtoskrnl/xtoskrnl.spec | 2 ++ 3 files changed, 64 insertions(+), 17 deletions(-) diff --git a/sdk/xtdk/kefuncs.h b/sdk/xtdk/kefuncs.h index 108d3f3..bca3a86 100644 --- a/sdk/xtdk/kefuncs.h +++ b/sdk/xtdk/kefuncs.h @@ -74,4 +74,12 @@ VOID KeSetTargetProcessorDpc(IN PKDPC Dpc, IN CCHAR Number); +XTAPI +VOID +KeSignalCallDpcDone(IN PVOID SystemArgument); + +XTAPI +BOOLEAN +KeSignalCallDpcSynchronize(IN PVOID SystemArgument); + #endif /* __XTDK_KEFUNCS_H */ diff --git a/xtoskrnl/ke/dpc.c b/xtoskrnl/ke/dpc.c index 6fb34df..3b7f9af 100644 --- a/xtoskrnl/ke/dpc.c +++ b/xtoskrnl/ke/dpc.c @@ -75,23 +75,6 @@ KeInitializeThreadedDpc(IN PKDPC Dpc, Dpc->DpcData = NULL; } -/** - * Retires the expired DPC objects found in the DPC list. - * - * @param Prcb - * Supplies apointer to the Prcessor Control Block (PRCB). - * - * @return This routine does not return any value. - * - * @since XT 1.0 - */ -XTFASTCALL -VOID -KepRetireDpcList(IN PKPROCESSOR_CONTROL_BLOCK Prcb) -{ - UNIMPLEMENTED; -} - /** * Sets the target processor number for DPC. * @@ -112,3 +95,57 @@ KeSetTargetProcessorDpc(IN PKDPC Dpc, { Dpc->Number = MAXIMUM_PROCESSORS + Number; } + +/** + * Decrements the DPC call barier. + * + * @param SystemArgument + * Supplies an address of the DPC call barrier. + * + * @return This routine does not return any value. + * + * @since NT 5.2 + */ +XTAPI +VOID +KeSignalCallDpcDone(IN PVOID SystemArgument) +{ + RtlAtomicDecrement32(SystemArgument); +} + +/** + * Decrements the DPC call reverse barier. + * + * @param SystemArgument + * Supplies an address of the DPC call barrier. + * + * @return This routine returns TRUE if just one processor is waiting on the barrier, FALSE if more. + * + * @since NT 5.2 + */ +XTAPI +BOOLEAN +KeSignalCallDpcSynchronize(IN PVOID SystemArgument) +{ + UNIMPLEMENTED; + + /* SMP not yet implemented, return TRUE */ + return TRUE; +} + +/** + * Retires the expired DPC objects found in the DPC list. + * + * @param Prcb + * Supplies apointer to the Prcessor Control Block (PRCB). + * + * @return This routine does not return any value. + * + * @since XT 1.0 + */ +XTFASTCALL +VOID +KepRetireDpcList(IN PKPROCESSOR_CONTROL_BLOCK Prcb) +{ + UNIMPLEMENTED; +} diff --git a/xtoskrnl/xtoskrnl.spec b/xtoskrnl/xtoskrnl.spec index 699ff09..8be270f 100644 --- a/xtoskrnl/xtoskrnl.spec +++ b/xtoskrnl/xtoskrnl.spec @@ -21,6 +21,8 @@ @ stdcall KeReadSemaphoreState(ptr) @ stdcall KeReleaseSemaphore(ptr long long long) @ stdcall KeSetTargetProcessorDpc(ptr long) +@ stdcall KeSignalCallDpcDone(ptr) +@ stdcall KeSignalCallDpcSynchronize(ptr) @ stdcall RtlCompareMemory(ptr ptr long) @ stdcall RtlCopyMemory(ptr ptr long) @ stdcall RtlFillMemory(ptr long long)