mirror of
https://github.com/reactos/reactos.git
synced 2024-08-02 09:30:55 +00:00
[WDM]
- 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:
parent
fc648d6443
commit
38b3788cbc
|
@ -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_ */
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue