Author: tfaber
Date: Fri Nov 11 23:04:26 2011
New Revision: 54353
URL:
http://svn.reactos.org/svn/reactos?rev=54353&view=rev
Log:
[KMTESTS]
- Fix AMD64 build
Modified:
trunk/rostests/kmtests/ntos_ex/ExFastMutex.c
trunk/rostests/kmtests/ntos_ke/KeIrql.c
trunk/rostests/kmtests/ntos_ke/KeSpinLock.c
trunk/rostests/kmtests/rtl/RtlMemory.c
Modified: trunk/rostests/kmtests/ntos_ex/ExFastMutex.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_ex/ExFastMut…
==============================================================================
--- trunk/rostests/kmtests/ntos_ex/ExFastMutex.c [iso-8859-1] (original)
+++ trunk/rostests/kmtests/ntos_ex/ExFastMutex.c [iso-8859-1] Fri Nov 11 23:04:26 2011
@@ -44,6 +44,7 @@
ExReleaseFastMutex(Mutex);
CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, OriginalIrql);
+#ifdef _M_X86
/* ntoskrnl's fastcall version */
ExiAcquireFastMutex(Mutex);
CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, APC_LEVEL);
@@ -51,6 +52,7 @@
CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, APC_LEVEL);
ExiReleaseFastMutex(Mutex);
CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, OriginalIrql);
+#endif
/* try to acquire */
ok_bool_true(ExTryToAcquireFastMutex(Mutex), "ExTryToAcquireFastMutex
returned");
Modified: trunk/rostests/kmtests/ntos_ke/KeIrql.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_ke/KeIrql.c?…
==============================================================================
--- trunk/rostests/kmtests/ntos_ke/KeIrql.c [iso-8859-1] (original)
+++ trunk/rostests/kmtests/ntos_ke/KeIrql.c [iso-8859-1] Fri Nov 11 23:04:26 2011
@@ -5,9 +5,10 @@
* PROGRAMMER: Thomas Faber <thfabba(a)gmx.de>
*/
+#ifndef _M_AMD64
__declspec(dllimport) void __stdcall KeRaiseIrql(unsigned char, unsigned char *);
__declspec(dllimport) void __stdcall KeLowerIrql(unsigned char);
-#ifdef _M_AMD64
+#else
#define CLOCK1_LEVEL CLOCK_LEVEL
#define CLOCK2_LEVEL CLOCK_LEVEL
#endif
@@ -137,6 +138,7 @@
KeLowerIrql(PASSIVE_LEVEL);
}
+#ifndef _M_AMD64
/* try the actual exports, not only the fastcall versions */
ok_irql(PASSIVE_LEVEL);
(KeRaiseIrql)(HIGH_LEVEL, &Irql);
@@ -144,6 +146,7 @@
ok_eq_uint(Irql, PASSIVE_LEVEL);
(KeLowerIrql)(Irql);
ok_irql(PASSIVE_LEVEL);
+#endif
/* make sure we exit gracefully */
ok_irql(PASSIVE_LEVEL);
Modified: trunk/rostests/kmtests/ntos_ke/KeSpinLock.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_ke/KeSpinLoc…
==============================================================================
--- trunk/rostests/kmtests/ntos_ke/KeSpinLock.c [iso-8859-1] (original)
+++ trunk/rostests/kmtests/ntos_ke/KeSpinLock.c [iso-8859-1] Fri Nov 11 23:04:26 2011
@@ -122,8 +122,13 @@
DEFINE_ACQUIRE(AcquireInStackForDpc, FALSE,
KeAcquireInStackQueuedSpinLockForDpc(SpinLock, &CheckData->QueueHandle))
DEFINE_RELEASE(ReleaseInStackForDpc, FALSE,
KeReleaseInStackQueuedSpinLockForDpc(&CheckData->QueueHandle))
+#ifdef _X86_
DEFINE_ACQUIRE(AcquireInt, FALSE, KiAcquireSpinLock(SpinLock))
DEFINE_RELEASE(ReleaseInt, FALSE, KiReleaseSpinLock(SpinLock))
+#else
+DEFINE_ACQUIRE(AcquireInt, TRUE, KeAcquireSpinLock(SpinLock,
&CheckData->Irql))
+DEFINE_RELEASE(ReleaseInt, TRUE, KeReleaseSpinLock(SpinLock,
CheckData->Irql))
+#endif
BOOLEAN TryQueued(PKSPIN_LOCK SpinLock, PCHECK_DATA CheckData) {
LOGICAL Ret = KeTryToAcquireQueuedSpinLock(CheckData->QueueNumber,
&CheckData->Irql);
Modified: trunk/rostests/kmtests/rtl/RtlMemory.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/rtl/RtlMemory.c?r…
==============================================================================
--- trunk/rostests/kmtests/rtl/RtlMemory.c [iso-8859-1] (original)
+++ trunk/rostests/kmtests/rtl/RtlMemory.c [iso-8859-1] Fri Nov 11 23:04:26 2011
@@ -440,6 +440,8 @@
ok_eq_hex(Status, STATUS_SUCCESS);
KeRaiseIrql(HIGH_LEVEL, &Irql);
+ /* TODO: fix NDK. This should work! */
+#if !defined _M_AMD64 || defined KMT_KERNEL_MODE
/* RtlFillMemoryUlong */
MakeBuffer(Buffer, Size, 0, 0);
RtlFillMemoryUlong(Buffer, HalfSize, 0x01234567LU);
@@ -459,6 +461,7 @@
} _SEH2_END;
ok_eq_hex(Status, STATUS_SUCCESS);
KeRaiseIrql(HIGH_LEVEL, &Irql);
+#endif
/* RtlFillMemoryUlonglong */
/* TODO: this function doesn't exist in 2k3/x86? wdm.h error? */