mirror of
https://github.com/reactos/reactos.git
synced 2025-06-04 00:40:31 +00:00
- Fix some warnings.
- Rearrange some code. - Remove useless/deprecated code. svn path=/trunk/; revision=25607
This commit is contained in:
parent
4fc7465a8f
commit
36433ba5ec
3 changed files with 16 additions and 40 deletions
|
@ -1066,7 +1066,7 @@ ExDupHandleTable(IN PEPROCESS Process,
|
|||
|
||||
/* Loop each entry */
|
||||
while (NewTable->NextHandleNeedingPool <
|
||||
HandleTable->NextHandleNeedingPool)
|
||||
HandleTable->NextHandleNeedingPool)
|
||||
{
|
||||
/* Insert it into the duplicated copy */
|
||||
if (!ExpAllocateHandleTableEntrySlow(NewTable, FALSE))
|
||||
|
|
|
@ -193,7 +193,8 @@ Ke386SanitizeDr(IN PVOID DrAddress,
|
|||
(Object)->OwnerThread = Thread; \
|
||||
\
|
||||
/* Disable APCs if needed */ \
|
||||
Thread->KernelApcDisable -= (Object)->ApcDisable; \
|
||||
Thread->KernelApcDisable = Thread->KernelApcDisable - \
|
||||
(Object)->ApcDisable; \
|
||||
\
|
||||
/* Check if it's abandoned */ \
|
||||
if ((Object)->Abandoned) \
|
||||
|
@ -238,7 +239,8 @@ Ke386SanitizeDr(IN PVOID DrAddress,
|
|||
(Object)->OwnerThread = Thread; \
|
||||
\
|
||||
/* Disable APCs if needed */ \
|
||||
Thread->KernelApcDisable -= (Object)->ApcDisable; \
|
||||
Thread->KernelApcDisable = Thread->KernelApcDisable - \
|
||||
(Object)->ApcDisable; \
|
||||
\
|
||||
/* Check if it's abandoned */ \
|
||||
if ((Object)->Abandoned) \
|
||||
|
@ -259,7 +261,7 @@ Ke386SanitizeDr(IN PVOID DrAddress,
|
|||
//
|
||||
// Satisfies the wait of any nonmutant dispatcher object
|
||||
//
|
||||
#define KiSatisfyNonMutantWait(Object, Thread) \
|
||||
#define KiSatisfyNonMutantWait(Object) \
|
||||
{ \
|
||||
if (((Object)->Header.Type & TIMER_OR_EVENT_TYPE) == \
|
||||
EventSynchronizationObject) \
|
||||
|
@ -454,7 +456,7 @@ KxSetTimerForThreadWait(IN PKTIMER Timer,
|
|||
/* Fill out the wait block */ \
|
||||
WaitBlock = &WaitBlockArray[Index]; \
|
||||
WaitBlock->Object = Object[Index]; \
|
||||
WaitBlock->WaitKey = Index; \
|
||||
WaitBlock->WaitKey = (USHORT)Index; \
|
||||
WaitBlock->WaitType = WaitType; \
|
||||
WaitBlock->Thread = Thread; \
|
||||
\
|
||||
|
@ -1470,10 +1472,6 @@ VOID
|
|||
FORCEINLINE
|
||||
KiInsertWaitTimer(IN PKTIMER Timer)
|
||||
{
|
||||
/* Set default data */
|
||||
Timer->Header.Inserted = TRUE;
|
||||
if (!Timer->Period) Timer->Header.SignalState = FALSE;
|
||||
|
||||
/* Now insert it into the Timer List */
|
||||
InsertAscendingList(&KiTimerListHead,
|
||||
Timer,
|
||||
|
|
|
@ -11,34 +11,10 @@
|
|||
|
||||
#include <ntoskrnl.h>
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <debug.h>
|
||||
|
||||
/* PRIVATE FUNCTIONS *********************************************************/
|
||||
|
||||
#if 0
|
||||
VOID
|
||||
FASTCALL
|
||||
KiWaitSatisfyAll(PKWAIT_BLOCK FirstBlock)
|
||||
{
|
||||
PKWAIT_BLOCK WaitBlock = FirstBlock;
|
||||
PKTHREAD WaitThread = WaitBlock->Thread;
|
||||
|
||||
/* Loop through all the Wait Blocks, and wake each Object */
|
||||
do
|
||||
{
|
||||
/* Make sure it hasn't timed out */
|
||||
if (WaitBlock->WaitKey != STATUS_TIMEOUT)
|
||||
{
|
||||
/* Wake the Object */
|
||||
KiSatisfyObjectWait((PKMUTANT)WaitBlock->Object, WaitThread);
|
||||
}
|
||||
|
||||
/* Move to the next block */
|
||||
WaitBlock = WaitBlock->NextWaitBlock;
|
||||
} while (WaitBlock != FirstBlock);
|
||||
}
|
||||
#endif
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
KiWaitTest(IN PVOID ObjectPointer,
|
||||
|
@ -163,7 +139,7 @@ KiExitDispatcher(IN KIRQL OldIrql)
|
|||
BOOLEAN PendingApc;
|
||||
|
||||
/* Make sure we're at synchronization level */
|
||||
ASSERT_IRQL_EQUAL(SYNCH_LEVEL);
|
||||
ASSERT(KeGetCurrentIrql() == SYNCH_LEVEL);
|
||||
|
||||
/* Check if we have deferred threads */
|
||||
KiCheckDeferredReadyList(Prcb);
|
||||
|
@ -288,7 +264,7 @@ KeDelayExecutionThread(IN KPROCESSOR_MODE WaitMode,
|
|||
|
||||
/* Check if the timer expired */
|
||||
InterruptTime.QuadPart = KeQueryInterruptTime();
|
||||
if (InterruptTime.QuadPart >= Timer->DueTime.QuadPart)
|
||||
if ((ULONGLONG)InterruptTime.QuadPart >= Timer->DueTime.QuadPart)
|
||||
{
|
||||
/* It did, so we don't need to wait */
|
||||
goto NoWait;
|
||||
|
@ -426,7 +402,7 @@ KeWaitForSingleObject(IN PVOID Object,
|
|||
else if (CurrentObject->Header.SignalState > 0)
|
||||
{
|
||||
/* Another satisfied object */
|
||||
KiSatisfyNonMutantWait(CurrentObject, Thread);
|
||||
KiSatisfyNonMutantWait(CurrentObject);
|
||||
WaitStatus = STATUS_WAIT_0;
|
||||
goto DontWait;
|
||||
}
|
||||
|
@ -440,7 +416,8 @@ KeWaitForSingleObject(IN PVOID Object,
|
|||
{
|
||||
/* Check if the timer expired */
|
||||
InterruptTime.QuadPart = KeQueryInterruptTime();
|
||||
if (InterruptTime.QuadPart >= Timer->DueTime.QuadPart)
|
||||
if ((ULONGLONG)InterruptTime.QuadPart >=
|
||||
Timer->DueTime.QuadPart)
|
||||
{
|
||||
/* It did, so we don't need to wait */
|
||||
WaitStatus = STATUS_TIMEOUT;
|
||||
|
@ -626,7 +603,7 @@ KeWaitForMultipleObjects(IN ULONG Count,
|
|||
else if (CurrentObject->Header.SignalState > 0)
|
||||
{
|
||||
/* Another signaled object, unwait and return */
|
||||
KiSatisfyNonMutantWait(CurrentObject, Thread);
|
||||
KiSatisfyNonMutantWait(CurrentObject);
|
||||
WaitStatus = Index;
|
||||
goto DontWait;
|
||||
}
|
||||
|
@ -702,7 +679,8 @@ KeWaitForMultipleObjects(IN ULONG Count,
|
|||
{
|
||||
/* Check if the timer expired */
|
||||
InterruptTime.QuadPart = KeQueryInterruptTime();
|
||||
if (InterruptTime.QuadPart >= Timer->DueTime.QuadPart)
|
||||
if ((ULONGLONG)InterruptTime.QuadPart >=
|
||||
Timer->DueTime.QuadPart)
|
||||
{
|
||||
/* It did, so we don't need to wait */
|
||||
WaitStatus = STATUS_TIMEOUT;
|
||||
|
|
Loading…
Reference in a new issue