mirror of
https://github.com/reactos/reactos.git
synced 2025-06-05 17:30:32 +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 */
|
/* Loop each entry */
|
||||||
while (NewTable->NextHandleNeedingPool <
|
while (NewTable->NextHandleNeedingPool <
|
||||||
HandleTable->NextHandleNeedingPool)
|
HandleTable->NextHandleNeedingPool)
|
||||||
{
|
{
|
||||||
/* Insert it into the duplicated copy */
|
/* Insert it into the duplicated copy */
|
||||||
if (!ExpAllocateHandleTableEntrySlow(NewTable, FALSE))
|
if (!ExpAllocateHandleTableEntrySlow(NewTable, FALSE))
|
||||||
|
|
|
@ -193,7 +193,8 @@ Ke386SanitizeDr(IN PVOID DrAddress,
|
||||||
(Object)->OwnerThread = Thread; \
|
(Object)->OwnerThread = Thread; \
|
||||||
\
|
\
|
||||||
/* Disable APCs if needed */ \
|
/* Disable APCs if needed */ \
|
||||||
Thread->KernelApcDisable -= (Object)->ApcDisable; \
|
Thread->KernelApcDisable = Thread->KernelApcDisable - \
|
||||||
|
(Object)->ApcDisable; \
|
||||||
\
|
\
|
||||||
/* Check if it's abandoned */ \
|
/* Check if it's abandoned */ \
|
||||||
if ((Object)->Abandoned) \
|
if ((Object)->Abandoned) \
|
||||||
|
@ -238,7 +239,8 @@ Ke386SanitizeDr(IN PVOID DrAddress,
|
||||||
(Object)->OwnerThread = Thread; \
|
(Object)->OwnerThread = Thread; \
|
||||||
\
|
\
|
||||||
/* Disable APCs if needed */ \
|
/* Disable APCs if needed */ \
|
||||||
Thread->KernelApcDisable -= (Object)->ApcDisable; \
|
Thread->KernelApcDisable = Thread->KernelApcDisable - \
|
||||||
|
(Object)->ApcDisable; \
|
||||||
\
|
\
|
||||||
/* Check if it's abandoned */ \
|
/* Check if it's abandoned */ \
|
||||||
if ((Object)->Abandoned) \
|
if ((Object)->Abandoned) \
|
||||||
|
@ -259,7 +261,7 @@ Ke386SanitizeDr(IN PVOID DrAddress,
|
||||||
//
|
//
|
||||||
// Satisfies the wait of any nonmutant dispatcher object
|
// Satisfies the wait of any nonmutant dispatcher object
|
||||||
//
|
//
|
||||||
#define KiSatisfyNonMutantWait(Object, Thread) \
|
#define KiSatisfyNonMutantWait(Object) \
|
||||||
{ \
|
{ \
|
||||||
if (((Object)->Header.Type & TIMER_OR_EVENT_TYPE) == \
|
if (((Object)->Header.Type & TIMER_OR_EVENT_TYPE) == \
|
||||||
EventSynchronizationObject) \
|
EventSynchronizationObject) \
|
||||||
|
@ -454,7 +456,7 @@ KxSetTimerForThreadWait(IN PKTIMER Timer,
|
||||||
/* Fill out the wait block */ \
|
/* Fill out the wait block */ \
|
||||||
WaitBlock = &WaitBlockArray[Index]; \
|
WaitBlock = &WaitBlockArray[Index]; \
|
||||||
WaitBlock->Object = Object[Index]; \
|
WaitBlock->Object = Object[Index]; \
|
||||||
WaitBlock->WaitKey = Index; \
|
WaitBlock->WaitKey = (USHORT)Index; \
|
||||||
WaitBlock->WaitType = WaitType; \
|
WaitBlock->WaitType = WaitType; \
|
||||||
WaitBlock->Thread = Thread; \
|
WaitBlock->Thread = Thread; \
|
||||||
\
|
\
|
||||||
|
@ -1470,10 +1472,6 @@ VOID
|
||||||
FORCEINLINE
|
FORCEINLINE
|
||||||
KiInsertWaitTimer(IN PKTIMER Timer)
|
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 */
|
/* Now insert it into the Timer List */
|
||||||
InsertAscendingList(&KiTimerListHead,
|
InsertAscendingList(&KiTimerListHead,
|
||||||
Timer,
|
Timer,
|
||||||
|
|
|
@ -11,34 +11,10 @@
|
||||||
|
|
||||||
#include <ntoskrnl.h>
|
#include <ntoskrnl.h>
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
/* PRIVATE FUNCTIONS *********************************************************/
|
/* 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
|
VOID
|
||||||
FASTCALL
|
FASTCALL
|
||||||
KiWaitTest(IN PVOID ObjectPointer,
|
KiWaitTest(IN PVOID ObjectPointer,
|
||||||
|
@ -163,7 +139,7 @@ KiExitDispatcher(IN KIRQL OldIrql)
|
||||||
BOOLEAN PendingApc;
|
BOOLEAN PendingApc;
|
||||||
|
|
||||||
/* Make sure we're at synchronization level */
|
/* Make sure we're at synchronization level */
|
||||||
ASSERT_IRQL_EQUAL(SYNCH_LEVEL);
|
ASSERT(KeGetCurrentIrql() == SYNCH_LEVEL);
|
||||||
|
|
||||||
/* Check if we have deferred threads */
|
/* Check if we have deferred threads */
|
||||||
KiCheckDeferredReadyList(Prcb);
|
KiCheckDeferredReadyList(Prcb);
|
||||||
|
@ -288,7 +264,7 @@ KeDelayExecutionThread(IN KPROCESSOR_MODE WaitMode,
|
||||||
|
|
||||||
/* Check if the timer expired */
|
/* Check if the timer expired */
|
||||||
InterruptTime.QuadPart = KeQueryInterruptTime();
|
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 */
|
/* It did, so we don't need to wait */
|
||||||
goto NoWait;
|
goto NoWait;
|
||||||
|
@ -426,7 +402,7 @@ KeWaitForSingleObject(IN PVOID Object,
|
||||||
else if (CurrentObject->Header.SignalState > 0)
|
else if (CurrentObject->Header.SignalState > 0)
|
||||||
{
|
{
|
||||||
/* Another satisfied object */
|
/* Another satisfied object */
|
||||||
KiSatisfyNonMutantWait(CurrentObject, Thread);
|
KiSatisfyNonMutantWait(CurrentObject);
|
||||||
WaitStatus = STATUS_WAIT_0;
|
WaitStatus = STATUS_WAIT_0;
|
||||||
goto DontWait;
|
goto DontWait;
|
||||||
}
|
}
|
||||||
|
@ -440,7 +416,8 @@ KeWaitForSingleObject(IN PVOID Object,
|
||||||
{
|
{
|
||||||
/* Check if the timer expired */
|
/* Check if the timer expired */
|
||||||
InterruptTime.QuadPart = KeQueryInterruptTime();
|
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 */
|
/* It did, so we don't need to wait */
|
||||||
WaitStatus = STATUS_TIMEOUT;
|
WaitStatus = STATUS_TIMEOUT;
|
||||||
|
@ -626,7 +603,7 @@ KeWaitForMultipleObjects(IN ULONG Count,
|
||||||
else if (CurrentObject->Header.SignalState > 0)
|
else if (CurrentObject->Header.SignalState > 0)
|
||||||
{
|
{
|
||||||
/* Another signaled object, unwait and return */
|
/* Another signaled object, unwait and return */
|
||||||
KiSatisfyNonMutantWait(CurrentObject, Thread);
|
KiSatisfyNonMutantWait(CurrentObject);
|
||||||
WaitStatus = Index;
|
WaitStatus = Index;
|
||||||
goto DontWait;
|
goto DontWait;
|
||||||
}
|
}
|
||||||
|
@ -702,7 +679,8 @@ KeWaitForMultipleObjects(IN ULONG Count,
|
||||||
{
|
{
|
||||||
/* Check if the timer expired */
|
/* Check if the timer expired */
|
||||||
InterruptTime.QuadPart = KeQueryInterruptTime();
|
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 */
|
/* It did, so we don't need to wait */
|
||||||
WaitStatus = STATUS_TIMEOUT;
|
WaitStatus = STATUS_TIMEOUT;
|
||||||
|
|
Loading…
Reference in a new issue