Author: greatlrd
Date: Sat Sep 30 18:43:41 2006
New Revision: 24316
URL:
http://svn.reactos.org/svn/reactos?rev=24316&view=rev
Log:
adding back __readcr4 and __readcr3 to winddk.h for gcc does not have it. come bit futer
build trunk
Modified:
trunk/reactos/include/ddk/winddk.h
Modified: trunk/reactos/include/ddk/winddk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=2…
==============================================================================
--- trunk/reactos/include/ddk/winddk.h (original)
+++ trunk/reactos/include/ddk/winddk.h Sat Sep 30 18:43:41 2006
@@ -35,6 +35,23 @@
/* Available as intrinsics on MSVC */
static __inline void _disable(void) {__asm__ __volatile__("cli\n");}
static __inline void _enable(void) {__asm__ __volatile__("sti\n");}
+
+
+static __inline ULONG64 __readcr3(void)
+{
+ ULONG_PTR Ret;
+ __asm__ __volatile__("movl %%cr3, %0;\n"
+ :"=r"(Ret));
+ return (ULONG64)Ret;
+}
+
+static __inline ULONG64 __readcr4(void)
+{
+ ULONG_PTR Ret;
+ __asm__ __volatile__("movl %%cr4, %0; \n"
+ :"=r"(Ret));
+ return (ULONG64)Ret;
+}
#endif
/*