Fix definition of KeInitializeSpinLock for x86 - it never inlined the operation....
authorStefan Ginsberg <stefanginsberg@gmail.com>
Thu, 16 Jul 2009 11:42:09 +0000 (11:42 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Thu, 16 Jul 2009 11:42:09 +0000 (11:42 +0000)
svn path=/trunk/; revision=41990

reactos/include/ddk/winddk.h
reactos/ntoskrnl/ke/spinlock.c
reactos/ntoskrnl/ntoskrnl-generic.rbuild
reactos/ntoskrnl/ntoskrnl.pspec

index 32b5f5c..0ecca59 100644 (file)
@@ -5642,11 +5642,26 @@ KeTestSpinLock(
 
 #if defined (_X86_)
 
+#if defined(WIN9X_COMPAT_SPINLOCK)
+
 NTKERNELAPI
 VOID
 NTAPI
 KeInitializeSpinLock(
-  IN PKSPIN_LOCK  SpinLock);
+    IN PKSPIN_LOCK SpinLock
+);
+
+#else
+
+FORCEINLINE
+VOID
+KeInitializeSpinLock(IN PKSPIN_LOCK SpinLock)
+{
+    /* Clear the lock */
+    *SpinLock = 0;
+}
+
+#endif
 
 NTHALAPI
 KIRQL
index 7e63026..8d5c72c 100644 (file)
@@ -123,7 +123,7 @@ KeReleaseInterruptSpinLock(IN PKINTERRUPT Interrupt,
  */
 VOID
 NTAPI
-KeInitializeSpinLock(IN PKSPIN_LOCK SpinLock)
+_KeInitializeSpinLock(IN PKSPIN_LOCK SpinLock)
 {
     /* Clear it */
     *SpinLock = 0;
index 15dc82e..3ea3762 100644 (file)
@@ -7,7 +7,6 @@
        <define name="_NTOSKRNL_" />
        <define name="_NTSYSTEM_" />
        <define name="__NO_CTYPE_INLINES" />
-       <define name="WIN9X_COMPAT_SPINLOCK" />
        <define name="_IN_KERNEL_" />
        <if property="_WINKD_" value="1">
                <define name="_WINKD_" />
index b68be24..d5c61bf 100644 (file)
 @ stdcall KeInitializeMutex(ptr long)
 @ stdcall KeInitializeQueue(ptr long)
 @ stdcall KeInitializeSemaphore(ptr long long)
-@ stdcall KeInitializeSpinLock(ptr)
+@ stdcall KeInitializeSpinLock(ptr) _KeInitializeSpinLock
 @ stdcall KeInitializeThreadedDpc(ptr ptr ptr)
 @ stdcall KeInitializeTimer(ptr)
 @ stdcall KeInitializeTimerEx(ptr long)