Author: sginsberg
Date: Thu Jul 16 13:42:09 2009
New Revision: 41990
URL:
http://svn.reactos.org/svn/reactos?rev=41990&view=rev
Log:
Fix definition of KeInitializeSpinLock for x86 - it never inlined the operation. It should
check if WIN9X_COMPAT_SPINLOCK is defined and don't inline it if so. Also, don't
define this flag when building ntoskrnl (MS DDK/WDK compilation fix) so we get the inline.
Instead, make the implementation "internal" to fix compilation.
Modified:
trunk/reactos/include/ddk/winddk.h
trunk/reactos/ntoskrnl/ke/spinlock.c
trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild
trunk/reactos/ntoskrnl/ntoskrnl.pspec
Modified: trunk/reactos/include/ddk/winddk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=4…
==============================================================================
--- trunk/reactos/include/ddk/winddk.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/winddk.h [iso-8859-1] Thu Jul 16 13:42:09 2009
@@ -5642,11 +5642,26 @@
#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
Modified: trunk/reactos/ntoskrnl/ke/spinlock.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/spinlock.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/spinlock.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/spinlock.c [iso-8859-1] Thu Jul 16 13:42:09 2009
@@ -123,7 +123,7 @@
*/
VOID
NTAPI
-KeInitializeSpinLock(IN PKSPIN_LOCK SpinLock)
+_KeInitializeSpinLock(IN PKSPIN_LOCK SpinLock)
{
/* Clear it */
*SpinLock = 0;
Modified: trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl-generic.…
==============================================================================
--- trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] Thu Jul 16 13:42:09 2009
@@ -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_" />
Modified: trunk/reactos/ntoskrnl/ntoskrnl.pspec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.pspec?re…
==============================================================================
--- trunk/reactos/ntoskrnl/ntoskrnl.pspec [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ntoskrnl.pspec [iso-8859-1] Thu Jul 16 13:42:09 2009
@@ -599,7 +599,7 @@
@ 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)