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.

svn path=/trunk/; revision=41990
This commit is contained in:
Stefan Ginsberg
2009-07-16 11:42:09 +00:00
parent c825c5dc02
commit 5e0347a52b
4 changed files with 18 additions and 4 deletions
+16 -1
View 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
+1 -1
View 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;
-1
View 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_" />
+1 -1
View File
@@ -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)