mirror of
https://github.com/reactos/reactos.git
synced 2025-06-10 04:14:53 +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
1 changed files with 16 additions and 1 deletions
|
@ -5194,7 +5194,7 @@ typedef struct _KFLOATING_SAVE {
|
||||||
ULONG Spare1;
|
ULONG Spare1;
|
||||||
} KFLOATING_SAVE, *PKFLOATING_SAVE;
|
} KFLOATING_SAVE, *PKFLOATING_SAVE;
|
||||||
|
|
||||||
extern volatile KSYSTEM_TIME KeTickCount;
|
extern NTKERNELAPI volatile KSYSTEM_TIME KeTickCount;
|
||||||
|
|
||||||
#define YieldProcessor _mm_pause
|
#define YieldProcessor _mm_pause
|
||||||
|
|
||||||
|
@ -5295,6 +5295,21 @@ KeRestoreFloatingPointState(
|
||||||
/* x86 and x64 performs a 0x2C interrupt */
|
/* x86 and x64 performs a 0x2C interrupt */
|
||||||
#define DbgRaiseAssertionFailure __int2c
|
#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_ */
|
#endif /* _X86_ */
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue