Author: tkreuzer Date: Fri Mar 12 18:48:50 2010 New Revision: 46143
URL: http://svn.reactos.org/svn/reactos?rev=46143&view=rev Log: [WDM] - fix definition of KeTickCount - Add KeQueryTickCount (note: MS version is very hacky. Someone tell them how to use DECLSPEC_IMPORT)
Modified: branches/header-work/include/ddk/wdm.h
Modified: branches/header-work/include/ddk/wdm.h URL: http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/wdm.h?re... ============================================================================== --- branches/header-work/include/ddk/wdm.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/wdm.h [iso-8859-1] Fri Mar 12 18:48:50 2010 @@ -5194,7 +5194,7 @@ ULONG Spare1; } KFLOATING_SAVE, *PKFLOATING_SAVE;
-extern volatile KSYSTEM_TIME KeTickCount; +extern NTKERNELAPI volatile KSYSTEM_TIME KeTickCount;
#define YieldProcessor _mm_pause
@@ -5294,6 +5294,21 @@
/* 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_ */