patch from w3seek :Bug #: 1667 : NTOSKRNL: Fix GCC4 warning and return correct error code in NtSignalAndWaitForSingleObject

svn path=/trunk/; revision=23041
This commit is contained in:
Magnus Olsen
2006-07-13 12:30:56 +00:00
parent d5f8964338
commit e862b8b461
3 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -261,7 +261,7 @@ KeUpdateRunTime(IN PKTRAP_FRAME TrapFrame,
{
/* Update user times */
CurrentThread->UserTime++;
InterlockedIncrement(&CurrentProcess->UserTime);
InterlockedIncrement((PLONG)&CurrentProcess->UserTime);
Prcb->UserTime++;
}
else
@@ -276,7 +276,7 @@ KeUpdateRunTime(IN PKTRAP_FRAME TrapFrame,
{
/* This was normal kernel time */
CurrentThread->KernelTime++;
InterlockedIncrement(&CurrentProcess->KernelTime);
InterlockedIncrement((PLONG)&CurrentProcess->KernelTime);
}
else if (Irql == DISPATCH_LEVEL)
{
+1 -1
View File
@@ -224,7 +224,7 @@ ObFastReplaceObject(IN PEX_FAST_REF FastRef,
}
/* Switch objects */
OldRef.Value = InterlockedExchange(&FastRef->Value, NewValue);
OldRef.Value = InterlockedExchange((PLONG)&FastRef->Value, NewValue);
OldObject = (PVOID)((ULONG_PTR)OldRef.Object &~ MAX_FAST_REFS);
if ((OldObject) && (OldRef.RefCnt))
{
+2
View File
@@ -477,6 +477,7 @@ NtSignalAndWaitForSingleObject(IN HANDLE ObjectHandleToSignal,
!(HandleInfo.GrantedAccess & EVENT_MODIFY_STATE))
{
/* Fail: lack of rights */
Status = STATUS_ACCESS_DENIED;
goto Quickie;
}
@@ -505,6 +506,7 @@ NtSignalAndWaitForSingleObject(IN HANDLE ObjectHandleToSignal,
!(HandleInfo.GrantedAccess & SEMAPHORE_MODIFY_STATE))
{
/* Fail: lack of rights */
Status = STATUS_ACCESS_DENIED;
goto Quickie;
}