- Fix comment headers for KeFlushQueueApc, KeInsertQueueApc.

- ASSERTify KeInsertQueueApc and some formatting fixes.

svn path=/trunk/; revision=24055
This commit is contained in:
Alex Ionescu 2006-09-11 02:17:57 +00:00
parent c9607ffe89
commit 8b90aed6be

View file

@ -658,48 +658,49 @@ KeInitializeApc(IN PKAPC Apc,
} }
/*++ /*++
* KeInsertQueueApc * @name KeInsertQueueApc
* @implemented NT4 * @implemented NT4
* *
* The KeInsertQueueApc routine queues a APC for execution when the right * The KeInsertQueueApc routine queues a APC for execution when the right
* scheduler environment exists. * scheduler environment exists.
* *
* Params: * @param Apc
* Apc - Pointer to an initialized control object of type DPC for which the * Pointer to an initialized control object of type DPC for which the
* caller provides the storage. * caller provides the storage.
* *
* SystemArgument[1,2] - Pointer to a set of two parameters that contain * @param SystemArgument[1,2]
* untyped data. * Pointer to a set of two parameters that contain untyped data.
* *
* PriorityBoost - Priority Boost to apply to the Thread. * @param PriorityBoost
* Priority Boost to apply to the Thread.
* *
* Returns: * @return If the APC is already inserted or APC queueing is disabled, FALSE.
* If the APC is already inserted or APC queueing is disabled, FALSE. * Otherwise, TRUE.
* Otherwise, TRUE.
* *
* Remarks: * @remarks The APC will execute at APC_LEVEL for the KernelRoutine registered,
* The APC will execute at APC_LEVEL for the KernelRoutine registered, and * and at PASSIVE_LEVEL for the NormalRoutine registered.
* at PASSIVE_LEVEL for the NormalRoutine registered.
* *
* Callers of this routine must be running at IRQL = PASSIVE_LEVEL. * Callers of this routine must be running at IRQL <= DISPATCH_LEVEL.
* *
*--*/ *--*/
BOOLEAN BOOLEAN
STDCALL NTAPI
KeInsertQueueApc(PKAPC Apc, KeInsertQueueApc(IN PKAPC Apc,
PVOID SystemArgument1, IN PVOID SystemArgument1,
PVOID SystemArgument2, IN PVOID SystemArgument2,
KPRIORITY PriorityBoost) IN KPRIORITY PriorityBoost)
{ {
PKTHREAD Thread = Apc->Thread; PKTHREAD Thread = Apc->Thread;
KLOCK_QUEUE_HANDLE ApcLock; KLOCK_QUEUE_HANDLE ApcLock;
BOOLEAN State = TRUE; BOOLEAN State = TRUE;
ASSERT_APC(Apc);
ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL);
/* Get the APC lock */ /* Get the APC lock */
KiAcquireApcLock(Thread, &ApcLock); KiAcquireApcLock(Thread, &ApcLock);
/* Make sure we can Queue APCs and that this one isn't already inserted */ /* Make sure we can Queue APCs and that this one isn't already inserted */
if ((Thread->ApcQueueable == FALSE) && (Apc->Inserted == TRUE)) if (!(Thread->ApcQueueable) && (Apc->Inserted))
{ {
/* Fail */ /* Fail */
State = FALSE; State = FALSE;
@ -722,23 +723,22 @@ KeInsertQueueApc(PKAPC Apc,
} }
/*++ /*++
* KeFlushQueueApc * @name KeFlushQueueApc
* @implemented NT4
* *
* The KeFlushQueueApc routine flushes all APCs of the given processor mode * The KeFlushQueueApc routine flushes all APCs of the given processor mode
* from the specified Thread's APC queue. * from the specified Thread's APC queue.
* *
* Params: * @param Thread
* Thread - Pointer to the thread whose APC queue will be flushed. * Pointer to the thread whose APC queue will be flushed.
* *
* PreviousMode - Specifies which APC Queue to flush. * @paramt PreviousMode
* Specifies which APC Queue to flush.
* *
* Returns: * @return A pointer to the first entry in the flushed APC queue.
* A pointer to the first entry in the flushed APC queue.
* *
* Remarks: * @remarks If the routine returns NULL, it means that no APCs were flushed.
* If the routine returns NULL, it means that no APCs were to be flushed. * Callers of this routine must be running at DISPATCH_LEVEL or lower.
*
* Callers of KeFlushQueueApc must be running at DISPATCH_LEVEL or lower.
* *
*--*/ *--*/
PLIST_ENTRY PLIST_ENTRY