#include <ntoskrnl.h>
#define NDEBUG
-#include <internal/debug.h>
+#include <debug.h>
#define LQ_WAIT 1
#define LQ_OWN 2
/* PUBLIC FUNCTIONS **********************************************************/
+#ifdef _X86_
+/*
+ * @implemented
+ */
+KIRQL
+NTAPI
+KeAcquireInterruptSpinLock(IN PKINTERRUPT Interrupt)
+{
+ KIRQL OldIrql;
+
+ /* Raise IRQL */
+ KeRaiseIrql(Interrupt->SynchronizeIrql, &OldIrql);
+
+ /* Acquire spinlock on MP */
+ KeAcquireSpinLockAtDpcLevel(Interrupt->ActualLock);
+ return OldIrql;
+}
+
/*
* @implemented
*/
VOID
NTAPI
-KeInitializeSpinLock(IN PKSPIN_LOCK SpinLock)
+KeReleaseInterruptSpinLock(IN PKINTERRUPT Interrupt,
+ IN KIRQL OldIrql)
+{
+ /* Release lock on MP */
+ KeReleaseSpinLockFromDpcLevel(Interrupt->ActualLock);
+
+ /* Lower IRQL */
+ KeLowerIrql(OldIrql);
+}
+
+/*
+ * @implemented
+ */
+VOID
+NTAPI
+_KeInitializeSpinLock(IN PKSPIN_LOCK SpinLock)
{
/* Clear it */
*SpinLock = 0;
}
+#endif
/*
* @implemented
return FALSE;
}
-#ifdef DBG
+#if DBG
/* On debug builds, we OR in the KTHREAD */
*SpinLock = (ULONG_PTR)KeGetCurrentThread() | 1;
#endif
}
/*
- * @implemented
+ * @unimplemented
*/
KIRQL
-NTAPI
-KeAcquireInterruptSpinLock(IN PKINTERRUPT Interrupt)
+FASTCALL
+KeAcquireSpinLockForDpc(IN PKSPIN_LOCK SpinLock)
{
- KIRQL OldIrql;
+ UNIMPLEMENTED;
+ return 0;
+}
- /* Raise IRQL */
- KeRaiseIrql(Interrupt->SynchronizeIrql, &OldIrql);
+/*
+ * @unimplemented
+ */
+VOID
+FASTCALL
+KeReleaseSpinLockForDpc(IN PKSPIN_LOCK SpinLock,
+ IN KIRQL OldIrql)
+{
+ UNIMPLEMENTED;
+}
- /* Acquire spinlock on MP */
- KefAcquireSpinLockAtDpcLevel(Interrupt->ActualLock);
- return OldIrql;
+/*
+ * @unimplemented
+ */
+KIRQL
+FASTCALL
+KeAcquireInStackQueuedSpinLockForDpc(IN PKSPIN_LOCK SpinLock,
+ IN PKLOCK_QUEUE_HANDLE LockHandle)
+{
+ UNIMPLEMENTED;
+ return 0;
}
/*
- * @implemented
+ * @unimplemented
*/
VOID
-NTAPI
-KeReleaseInterruptSpinLock(IN PKINTERRUPT Interrupt,
- IN KIRQL OldIrql)
+FASTCALL
+KeReleaseInStackQueuedSpinLockForDpc(IN PKLOCK_QUEUE_HANDLE LockHandle)
{
- /* Release lock on MP */
- KefReleaseSpinLockFromDpcLevel(Interrupt->ActualLock);
+ UNIMPLEMENTED;
+}
- /* Lower IRQL */
- KeLowerIrql(OldIrql);
+/*
+ * @implemented
+ */
+BOOLEAN
+FASTCALL
+KeTestSpinLock(IN PKSPIN_LOCK SpinLock)
+{
+ /* Test this spinlock */
+ if (*SpinLock)
+ {
+ /* Spinlock is busy, yield execution */
+ YieldProcessor();
+
+ /* Return busy flag */
+ return FALSE;
+ }
+
+ /* Spinlock appears to be free */
+ return TRUE;
}
/* EOF */