Implement KeInitializeThreadedDpc() and export it together with KeInitializeDpc()
All checks were successful
Builds / ExectOS (i686) (push) Successful in 27s
Builds / ExectOS (amd64) (push) Successful in 27s

This commit is contained in:
Rafal Kupiec 2023-10-29 19:45:45 +01:00
parent a359c9b2e8
commit be7981f614
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
3 changed files with 47 additions and 0 deletions

View File

@ -27,6 +27,12 @@ KeInitializeApc(IN PKAPC Apc,
IN KPROCESSOR_MODE ApcMode,
IN PVOID Context);
XTAPI
VOID
KeInitializeDpc(IN PKDPC Dpc,
IN PKDEFERRED_ROUTINE DpcRoutine,
IN PVOID DpcContext);
XTAPI
VOID
KeInitializeSemaphore(IN PKSEMAPHORE Semaphore,
@ -37,6 +43,12 @@ XTAPI
VOID
KeInitializeSpinLock(IN PKSPIN_LOCK SpinLock);
XTAPI
VOID
KeInitializeThreadedDpc(IN PKDPC Dpc,
IN PKDEFERRED_ROUTINE DpcRoutine,
IN PVOID DpcContext);
XTAPI
VOID
KeInitializeTimer(OUT PKTIMER Timer);

View File

@ -42,6 +42,39 @@ KeInitializeDpc(IN PKDPC Dpc,
Dpc->DpcData = NULL;
}
/**
* Initializes Deferred Procedure Call (DPC) object.
*
* @param Dpc
* Supplies a pointer to the DPC being initialized.
*
* @param DpcRoutine
* Supplies a pointer to the DPC routine being called on object removal.
*
* @param DpcContext
* Supplies a pointer to memory area containing context data for DPC routine.
*
* @return This routine does not return any value.
*
* @since NT 5.2
*/
XTAPI
VOID
KeInitializeThreadedDpc(IN PKDPC Dpc,
IN PKDEFERRED_ROUTINE DpcRoutine,
IN PVOID DpcContext)
{
/* Initialize threaded DPC */
Dpc->Type = ThreadedDpcObject;
Dpc->Number = 0;
Dpc->Importance = MediumImportance;
/* Initialize DPC routine and context data */
Dpc->DeferredContext = DpcContext;
Dpc->DeferredRoutine = DpcRoutine;
Dpc->DpcData = NULL;
}
/**
* Retires the expired DPC objects found in the DPC list.
*

View File

@ -8,8 +8,10 @@
@ cdecl HlIoPortOutLong(ptr long)
@ cdecl HlIoPortOutShort(ptr long)
@ stdcall KeInitializeApc(ptr ptr long ptr ptr ptr long ptr)
@ stdcall KeInitializeDpc(ptr ptr ptr)
@ stdcall KeInitializeSemaphore(ptr long long)
@ stdcall KeInitializeSpinLock(ptr)
@ stdcall KeInitializeThreadedDpc(ptr ptr ptr)
@ stdcall KeInitializeTimer(ptr)
@ stdcall KeInitializeTimerEx(ptr long)
@ stdcall KeReadSemaphoreState(ptr)