X-Git-Url: http://git.jankratochvil.net/?p=reactos.git;a=blobdiff_plain;f=ntoskrnl%2Fke%2Fdpc.c;fp=ntoskrnl%2Fke%2Fdpc.c;h=2d2df8dadbc5688049dee83ec34f5b1b8da8babb;hp=b056e65f349ad470097b552dbe84317fc2feb76e;hb=7c0cf90e3b750f1f0dc83b2eec9e5c68a512c30f;hpb=ee8b63255465d8c28be3e7bd11628015708fc1ab diff --git a/ntoskrnl/ke/dpc.c b/ntoskrnl/ke/dpc.c index b056e65..2d2df8d 100644 --- a/ntoskrnl/ke/dpc.c +++ b/ntoskrnl/ke/dpc.c @@ -60,6 +60,9 @@ ULONG DpcQueueSize = 0; /* FUNCTIONS ****************************************************************/ +/* + * @implemented + */ VOID STDCALL KeInitializeDpc (PKDPC Dpc, PKDEFERRED_ROUTINE DeferredRoutine, @@ -81,6 +84,9 @@ KeInitializeDpc (PKDPC Dpc, #ifndef LIBCAPTIVE +/* + * @implemented + */ VOID STDCALL KiDispatchInterrupt(VOID) /* @@ -100,37 +106,29 @@ KiDispatchInterrupt(VOID) KeRaiseIrql(HIGH_LEVEL, &oldlvl); KeAcquireSpinLockAtDpcLevel(&DpcQueueLock); - current_entry = RemoveHeadList(&DpcQueueHead); - if (current_entry != &DpcQueueHead) - { - DpcQueueSize--; - } - KeReleaseSpinLockFromDpcLevel(&DpcQueueLock); - current = CONTAINING_RECORD(current_entry,KDPC,DpcListEntry); - current->Lock=FALSE; - KeLowerIrql(oldlvl); - while (current_entry!=(&DpcQueueHead)) - { - current->DeferredRoutine(current,current->DeferredContext, - current->SystemArgument1, - current->SystemArgument2); - - KeRaiseIrql(HIGH_LEVEL, &oldlvl); - KeAcquireSpinLockAtDpcLevel(&DpcQueueLock); - current_entry = RemoveHeadList(&DpcQueueHead); - if (current_entry != &DpcQueueHead) - { - DpcQueueSize--; - } - KeReleaseSpinLockFromDpcLevel(&DpcQueueLock); - current = CONTAINING_RECORD(current_entry,KDPC,DpcListEntry); - current->Lock=FALSE; - KeLowerIrql(oldlvl); - } + + while (!IsListEmpty(&DpcQueueHead)) + { + current_entry = RemoveHeadList(&DpcQueueHead); + DpcQueueSize--; + current = CONTAINING_RECORD(current_entry,KDPC,DpcListEntry); + current->Lock=FALSE; + KeReleaseSpinLock(&DpcQueueLock, oldlvl); + current->DeferredRoutine(current,current->DeferredContext, + current->SystemArgument1, + current->SystemArgument2); + + KeRaiseIrql(HIGH_LEVEL, &oldlvl); + KeAcquireSpinLockAtDpcLevel(&DpcQueueLock); + } + KeReleaseSpinLock(&DpcQueueLock, oldlvl); } #endif /* LIBCAPTIVE */ +/* + * @implemented + */ BOOLEAN STDCALL KeRemoveQueueDpc (PKDPC Dpc) /* @@ -143,8 +141,8 @@ KeRemoveQueueDpc (PKDPC Dpc) { KIRQL oldIrql; - KeAcquireSpinLockAtDpcLevel(&DpcQueueLock); KeRaiseIrql(HIGH_LEVEL, &oldIrql); + KeAcquireSpinLockAtDpcLevel(&DpcQueueLock); if (!Dpc->Lock) { KeReleaseSpinLock(&DpcQueueLock, oldIrql); @@ -159,6 +157,9 @@ KeRemoveQueueDpc (PKDPC Dpc) #ifndef LIBCAPTIVE +/* + * @implemented + */ BOOLEAN STDCALL KeInsertQueueDpc (PKDPC Dpc, PVOID SystemArgument1, @@ -205,6 +206,8 @@ KeInsertQueueDpc (PKDPC Dpc, * Dpc = Initalizes DPC * Importance = DPC importance * RETURNS: None + * + * @implemented */ VOID STDCALL KeSetImportanceDpc (IN PKDPC Dpc, @@ -219,6 +222,8 @@ KeSetImportanceDpc (IN PKDPC Dpc, * Dpc = Initalizes DPC * Number = Processor number * RETURNS: None + * + * @unimplemented */ VOID STDCALL KeSetTargetProcessorDpc (IN PKDPC Dpc,