/* FUNCTIONS ***************************************************************/
+/*
+ * @implemented
+ */
BOOLEAN STDCALL
KeSynchronizeExecution (PKINTERRUPT Interrupt,
PKSYNCHRONIZE_ROUTINE SynchronizeRoutine,
return(ret);
}
+/*
+ * @implemented
+ */
VOID STDCALL
KeInitializeSpinLock (PKSPIN_LOCK SpinLock)
/*
* SpinLock = Caller supplied storage for the spinlock
*/
{
- SpinLock->Lock = 0;
+ *SpinLock = 0;
}
+#undef KeAcquireSpinLockAtDpcLevel
+
+/*
+ * @implemented
+ */
VOID STDCALL
KeAcquireSpinLockAtDpcLevel (PKSPIN_LOCK SpinLock)
/*
* FIXME: This depends on gcc assembling this test to a single load from
* the spinlock's value.
*/
- if ((ULONG)SpinLock->Lock >= 2)
+ if (*SpinLock >= 2)
{
- DbgPrint("Lock %x has bad value %x\n", SpinLock, SpinLock->Lock);
- KeBugCheck(0);
+ DbgPrint("Lock %x has bad value %x\n", SpinLock, *SpinLock);
+ KEBUGCHECK(0);
}
- while ((i = InterlockedExchange(&SpinLock->Lock, 1)) == 1)
+ while ((i = InterlockedExchange((LONG *)SpinLock, 1)) == 1)
{
#ifndef MP
DbgPrint("Spinning on spinlock %x current value %x\n", SpinLock, i);
- KeBugCheck(0);
+ KEBUGCHECK(0);
#else /* not MP */
/* Avoid reading the value again too fast */
#endif /* MP */
}
}
+#undef KeReleaseSpinLockFromDpcLevel
+
+/*
+ * @implemented
+ */
VOID STDCALL
KeReleaseSpinLockFromDpcLevel (PKSPIN_LOCK SpinLock)
/*
* SpinLock = Spinlock to release
*/
{
- if (SpinLock->Lock != 1)
+ if (*SpinLock != 1)
{
DbgPrint("Releasing unacquired spinlock %x\n", SpinLock);
- KeBugCheck(0);
+ KEBUGCHECK(0);
}
- (void)InterlockedExchange(&SpinLock->Lock, 0);
+ (void)InterlockedExchange((LONG *)SpinLock, 0);
}
/* EOF */