- Add stubs for KdSave, KdRestore, KdDebuggerInitialize0, KdSendPacket, KdReceivePacket to kdcom.dll

- Implement and export KeTryToAcquireSpinLockAtDpcLevel.

svn path=/branches/alex-kd-branch/; revision=25835
This commit is contained in:
Alex Ionescu
2007-02-18 16:50:37 +00:00
parent 59caa79d63
commit ff6bd309f3
4 changed files with 104 additions and 12 deletions
+64
View File
@@ -17,6 +17,8 @@
#include <halfuncs.h>
#include <stdio.h>
#include <debug.h>
#include "arc/arc.h"
#include "windbgkd.h"
typedef struct _KD_PORT_INFORMATION
{
@@ -553,4 +555,66 @@ KdPortEnableInterrupts()
return TRUE;
}
/*
* @unimplemented
*/
NTSTATUS
NTAPI
KdDebuggerInitialize0(IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL)
{
/* FIXME: TODO */
return STATUS_UNSUCCESSFUL;
}
/*
* @implemented
*/
NTSTATUS
NTAPI
KdSave(IN BOOLEAN SleepTransition)
{
/* Nothing to do on COM ports */
return STATUS_SUCCESS;
}
/*
* @implemented
*/
NTSTATUS
NTAPI
KdRestore(IN BOOLEAN SleepTransition)
{
/* Nothing to do on COM ports */
return STATUS_SUCCESS;
}
/*
* @unimplemented
*/
VOID
NTAPI
KdSendPacket(IN USHORT PacketType,
IN PSTRING Header,
IN PSTRING Data OPTIONAL,
OUT PKD_CONTEXT Context)
{
/* FIXME: TODO */
return;
}
/*
* @unimplemented
*/
ULONG
NTAPI
KdReceivePacket(IN USHORT PacketType,
OUT PSTRING Header,
OUT PSTRING Data,
OUT PUSHORT DataSize,
OUT PKD_CONTEXT Context OPTIONAL)
{
/* FIXME: TODO */
return 0;
}
/* EOF */
+5 -12
View File
@@ -1,15 +1,8 @@
LIBRARY kdcom.dll
EXPORTS
KdPortGetByte@4
KdPortGetByteEx@8
KdPortInitialize@12
KdPortInitializeEx@12
KdPortPollByte@4
KdPortPollByteEx@8
KdPortPutByte@4
KdPortPutByteEx@8
KdPortRestore@0
KdPortSave@0
KdPortDisableInterrupts@0
KdPortEnableInterrupts@0
KdDebuggerInitialize0@4
KdSave@4
KdRestore@4
KdReceivePacket@20
KdSendPacket@16
+34
View File
@@ -165,6 +165,40 @@ KiReleaseSpinLock(IN PKSPIN_LOCK SpinLock)
KxReleaseSpinLock(SpinLock);
}
/*
* @implemented
*/
BOOLEAN
FASTCALL
KeTryToAcquireSpinLockAtDpcLevel(IN OUT PKSPIN_LOCK SpinLock)
{
#ifdef CONFIG_SMP
/* Check if it's already acquired */
if (!(*SpinLock))
{
/* Try to acquire it */
if (InterlockedBitTestAndSet((PLONG)SpinLock, 0))
{
/* Someone else acquired it */
return FALSE;
}
}
else
{
/* It was already acquired */
return FALSE;
}
#ifdef DBG
/* On debug builds, we OR in the KTHREAD */
*SpinLock = (ULONG_PTR)KeGetCurrentThread() | 1;
#endif
#endif
/* All is well, return TRUE */
return TRUE;
}
/*
* @implemented
*/
+1
View File
@@ -650,6 +650,7 @@ KeSynchronizeExecution@12
KeTerminateThread@4
KeTickCount DATA
@KeTryToAcquireGuardedMutex@4
@KeTryToAcquireSpinLockAtDpcLevel@4
KeUpdateRunTime@4
KeUpdateSystemTime@0
KeUnstackDetachProcess@4