https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a8b09eddc4a6c4a51f722…
commit a8b09eddc4a6c4a51f72222faa259d0862197008
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Mon Jan 9 12:31:03 2023 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Thu Mar 9 18:32:36 2023 +0100
[NTOS:KD] Add some annotations.
---
ntoskrnl/include/internal/kd.h | 26 +++++++++++---------------
ntoskrnl/kd/kdio.c | 19 +++++++++++--------
ntoskrnl/kd/kdmain.c | 7 ++++---
ntoskrnl/kdbg/kdb_symbols.c | 4 ++--
sdk/include/reactos/kddll.h | 4 ++--
5 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/ntoskrnl/include/internal/kd.h b/ntoskrnl/include/internal/kd.h
index 87f0854693d..ef014a2c6a5 100644
--- a/ntoskrnl/include/internal/kd.h
+++ b/ntoskrnl/include/internal/kd.h
@@ -40,10 +40,9 @@ typedef enum _KD_CONTINUE_TYPE
typedef
VOID
-(NTAPI*PKDP_INIT_ROUTINE)(
- struct _KD_DISPATCH_TABLE *DispatchTable,
- ULONG BootPhase
-);
+(NTAPI *PKDP_INIT_ROUTINE)(
+ _In_ struct _KD_DISPATCH_TABLE *DispatchTable,
+ _In_ ULONG BootPhase);
typedef
VOID
@@ -63,30 +62,27 @@ KdpScreenRelease(VOID);
VOID
NTAPI
KdpScreenInit(
- struct _KD_DISPATCH_TABLE *DispatchTable,
- ULONG BootPhase
-);
+ _In_ struct _KD_DISPATCH_TABLE *DispatchTable,
+ _In_ ULONG BootPhase);
VOID
NTAPI
KdpSerialInit(
- struct _KD_DISPATCH_TABLE *DispatchTable,
- ULONG BootPhase
-);
+ _In_ struct _KD_DISPATCH_TABLE *DispatchTable,
+ _In_ ULONG BootPhase);
VOID
NTAPI
KdpDebugLogInit(
- struct _KD_DISPATCH_TABLE *DispatchTable,
- ULONG BootPhase
-);
+ _In_ struct _KD_DISPATCH_TABLE *DispatchTable,
+ _In_ ULONG BootPhase);
#ifdef KDBG
VOID
NTAPI
KdpKdbgInit(
- struct _KD_DISPATCH_TABLE *DispatchTable,
- ULONG BootPhase);
+ _In_ struct _KD_DISPATCH_TABLE *DispatchTable,
+ _In_ ULONG BootPhase);
#endif
diff --git a/ntoskrnl/kd/kdio.c b/ntoskrnl/kd/kdio.c
index 5f2c7f966c7..c186e60752d 100644
--- a/ntoskrnl/kd/kdio.c
+++ b/ntoskrnl/kd/kdio.c
@@ -212,8 +212,9 @@ KdpPrintToLogFile(PCHAR String,
VOID
NTAPI
-KdpDebugLogInit(PKD_DISPATCH_TABLE DispatchTable,
- ULONG BootPhase)
+KdpDebugLogInit(
+ _In_ PKD_DISPATCH_TABLE DispatchTable,
+ _In_ ULONG BootPhase)
{
NTSTATUS Status;
UNICODE_STRING FileName;
@@ -340,8 +341,9 @@ KdpSerialPrint(PCHAR String,
VOID
NTAPI
-KdpSerialInit(PKD_DISPATCH_TABLE DispatchTable,
- ULONG BootPhase)
+KdpSerialInit(
+ _In_ PKD_DISPATCH_TABLE DispatchTable,
+ _In_ ULONG BootPhase)
{
if (!KdpDebugMode.Serial) return;
@@ -504,8 +506,9 @@ KdpScreenPrint(PCHAR String,
VOID
NTAPI
-KdpScreenInit(PKD_DISPATCH_TABLE DispatchTable,
- ULONG BootPhase)
+KdpScreenInit(
+ _In_ PKD_DISPATCH_TABLE DispatchTable,
+ _In_ ULONG BootPhase)
{
if (!KdpDebugMode.Screen) return;
@@ -550,8 +553,8 @@ KdbInitialize(PKD_DISPATCH_TABLE DispatchTable, ULONG BootPhase);
VOID
NTAPI
KdpKdbgInit(
- PKD_DISPATCH_TABLE DispatchTable,
- ULONG BootPhase)
+ _In_ PKD_DISPATCH_TABLE DispatchTable,
+ _In_ ULONG BootPhase)
{
/* Forward the call */
KdbInitialize(DispatchTable, BootPhase);
diff --git a/ntoskrnl/kd/kdmain.c b/ntoskrnl/kd/kdmain.c
index 073a128ef3a..be749a705a9 100644
--- a/ntoskrnl/kd/kdmain.c
+++ b/ntoskrnl/kd/kdmain.c
@@ -21,7 +21,8 @@ extern ANSI_STRING KdpLogFileName;
static PCHAR
NTAPI
-KdpGetDebugMode(PCHAR Currentp2)
+KdpGetDebugMode(
+ _In_ PCHAR Currentp2)
{
PCHAR p1, p2 = Currentp2;
ULONG Value;
@@ -83,7 +84,7 @@ KdpGetDebugMode(PCHAR Currentp2)
NTSTATUS
NTAPI
KdDebuggerInitialize0(
- IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL)
+ _In_opt_ PLOADER_PARAMETER_BLOCK LoaderBlock)
{
ULONG i;
PCHAR CommandLine, Port = NULL;
@@ -138,7 +139,7 @@ KdDebuggerInitialize0(
NTSTATUS
NTAPI
KdDebuggerInitialize1(
- IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL)
+ _In_opt_ PLOADER_PARAMETER_BLOCK LoaderBlock)
{
PLIST_ENTRY CurrentEntry;
PKD_DISPATCH_TABLE CurrentTable;
diff --git a/ntoskrnl/kdbg/kdb_symbols.c b/ntoskrnl/kdbg/kdb_symbols.c
index f2e0088d006..06325b65fb6 100644
--- a/ntoskrnl/kdbg/kdb_symbols.c
+++ b/ntoskrnl/kdbg/kdb_symbols.c
@@ -348,8 +348,8 @@ KdbDebugPrint(
VOID
NTAPI
KdbInitialize(
- PKD_DISPATCH_TABLE DispatchTable,
- ULONG BootPhase)
+ _In_ PKD_DISPATCH_TABLE DispatchTable,
+ _In_ ULONG BootPhase)
{
PCHAR p1, p2;
SHORT Found = FALSE;
diff --git a/sdk/include/reactos/kddll.h b/sdk/include/reactos/kddll.h
index 5e6e45bd953..6829bde4822 100644
--- a/sdk/include/reactos/kddll.h
+++ b/sdk/include/reactos/kddll.h
@@ -9,13 +9,13 @@ typedef ULONG KDSTATUS;
NTSTATUS
NTAPI
KdDebuggerInitialize0(
- IN PLOADER_PARAMETER_BLOCK LoaderBlock
+ _In_opt_ PLOADER_PARAMETER_BLOCK LoaderBlock
);
NTSTATUS
NTAPI
KdDebuggerInitialize1(
- IN PLOADER_PARAMETER_BLOCK LoaderBlock
+ _In_opt_ PLOADER_PARAMETER_BLOCK LoaderBlock
);
KDSTATUS