- fix definition of KeTickCount
- Add KeQueryTickCount (note: MS version is very hacky. Someone tell them how to use DECLSPEC_IMPORT)

svn path=/branches/header-work/; revision=46143
This commit is contained in:
Timo Kreuzer 2010-03-12 17:48:50 +00:00
parent fc648d6443
commit 38b3788cbc

View file

@ -5194,7 +5194,7 @@ typedef struct _KFLOATING_SAVE {
ULONG Spare1;
} KFLOATING_SAVE, *PKFLOATING_SAVE;
extern volatile KSYSTEM_TIME KeTickCount;
extern NTKERNELAPI volatile KSYSTEM_TIME KeTickCount;
#define YieldProcessor _mm_pause
@ -5295,6 +5295,21 @@ KeRestoreFloatingPointState(
/* x86 and x64 performs a 0x2C interrupt */
#define DbgRaiseAssertionFailure __int2c
FORCEINLINE
VOID
_KeQueryTickCount(
OUT PLARGE_INTEGER CurrentCount)
{
for (;;)
{
CurrentCount->HighPart = KeTickCount.High1Time;
CurrentCount->LowPart = KeTickCount.LowPart;
if (CurrentCount->HighPart == KeTickCount.High2Time) break;
YieldProcessor();
}
}
#define KeQueryTickCount(CurrentCount) _KeQueryTickCount(CurrentCount)
#endif /* _X86_ */