{
ULONG BitsToRemove, BitsToAdd;
LONG OldValue, NewValue;
+
+ /* We depend on these bits being just right */
+ C_ASSERT((GM_LOCK_WAITER_WOKEN * 2) == GM_LOCK_WAITER_INC);
/* Increase the contention count */
GuardedMutex->Contention++;
/* Ok, the wait is done, so set the new bits */
BitsToRemove = GM_LOCK_BIT | GM_LOCK_WAITER_WOKEN;
BitsToAdd = GM_LOCK_WAITER_WOKEN;
-
- /* We depend on these bits being just right */
- C_ASSERT((GM_LOCK_WAITER_WOKEN * 2) == GM_LOCK_WAITER_INC);
}
}
{
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
LARGE_INTEGER SafeInterval;
- NTSTATUS Status = STATUS_SUCCESS;
+ NTSTATUS Status;
/* Check the previous mode */
- if(PreviousMode != KernelMode)
+ if (PreviousMode != KernelMode)
{
/* Enter SEH for probing */
_SEH2_TRY
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- /* Get SEH exception */
- Status = _SEH2_GetExceptionCode();
+ /* Return the exception code */
+ _SEH2_YIELD(return _SEH2_GetExceptionCode());
}
_SEH2_END;
- if (!NT_SUCCESS(Status)) return Status;
}
/* Call the Kernel Function */