Author: tkreuzer
Date: Wed Sep 26 09:40:44 2012
New Revision: 57389
URL:
http://svn.reactos.org/svn/reactos?rev=57389&view=rev
Log:
[PSDK/DDK/XDK]
- Remove duplicated definitions from ntddk.h
- Fix annotations in ntifs.h, wdm.h, ntgdi.h, winddi.h
[NDK]
- Declare most of the heap functions only for user mode
- Remove duplicate RtlGetNtGlobalFlags()
Modified:
trunk/reactos/include/ddk/ntddk.h
trunk/reactos/include/ddk/ntifs.h
trunk/reactos/include/ddk/wdm.h
trunk/reactos/include/ndk/rtlfuncs.h
trunk/reactos/include/psdk/ntgdi.h
trunk/reactos/include/psdk/winddi.h
trunk/reactos/include/xdk/iofuncs.h
trunk/reactos/include/xdk/kefuncs.h
trunk/reactos/include/xdk/mmfuncs.h
Modified: trunk/reactos/include/ddk/ntddk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntddk.h?rev=57…
==============================================================================
--- trunk/reactos/include/ddk/ntddk.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/ntddk.h [iso-8859-1] Wed Sep 26 09:40:44 2012
@@ -4680,59 +4680,6 @@
_In_ PPHYSICAL_ADDRESS StartAddress,
_Inout_ PLARGE_INTEGER NumberOfBytes);
-_Must_inspect_result_
-_IRQL_requires_max_(DISPATCH_LEVEL)
-_When_(return != NULL, _Post_writable_byte_size_(NumberOfBytes))
-NTKERNELAPI
-PVOID
-NTAPI
-MmAllocateContiguousMemory(
- _In_ SIZE_T NumberOfBytes,
- _In_ PHYSICAL_ADDRESS HighestAcceptableAddress);
-
-_Must_inspect_result_
-_IRQL_requires_max_(DISPATCH_LEVEL)
-_When_(return != NULL, _Post_writable_byte_size_(NumberOfBytes))
-NTKERNELAPI
-PVOID
-NTAPI
-MmAllocateContiguousMemorySpecifyCache(
- _In_ SIZE_T NumberOfBytes,
- _In_ PHYSICAL_ADDRESS LowestAcceptableAddress,
- _In_ PHYSICAL_ADDRESS HighestAcceptableAddress,
- _In_opt_ PHYSICAL_ADDRESS BoundaryAddressMultiple,
- _In_ MEMORY_CACHING_TYPE CacheType);
-
-_Must_inspect_result_
-_IRQL_requires_max_(DISPATCH_LEVEL)
-_When_(return != NULL, _Post_writable_byte_size_(NumberOfBytes))
-NTKERNELAPI
-PVOID
-NTAPI
-MmAllocateContiguousMemorySpecifyCacheNode(
- _In_ SIZE_T NumberOfBytes,
- _In_ PHYSICAL_ADDRESS LowestAcceptableAddress,
- _In_ PHYSICAL_ADDRESS HighestAcceptableAddress,
- _In_opt_ PHYSICAL_ADDRESS BoundaryAddressMultiple,
- _In_ MEMORY_CACHING_TYPE CacheType,
- _In_ NODE_REQUIREMENT PreferredNode);
-
-_IRQL_requires_max_(DISPATCH_LEVEL)
-NTKERNELAPI
-VOID
-NTAPI
-MmFreeContiguousMemory(
- _In_ PVOID BaseAddress);
-
-_IRQL_requires_max_(DISPATCH_LEVEL)
-NTKERNELAPI
-VOID
-NTAPI
-MmFreeContiguousMemorySpecifyCache(
- _In_reads_bytes_(NumberOfBytes) PVOID BaseAddress,
- _In_ SIZE_T NumberOfBytes,
- _In_ MEMORY_CACHING_TYPE CacheType);
-
#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */
Modified: trunk/reactos/include/ddk/ntifs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntifs.h?rev=57…
==============================================================================
--- trunk/reactos/include/ddk/ntifs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/ntifs.h [iso-8859-1] Wed Sep 26 09:40:44 2012
@@ -5083,8 +5083,8 @@
_Inout_ PLIST_ENTRY Entry);
_IRQL_requires_min_(PASSIVE_LEVEL)
-_When_((Timeout==NULL || *Timeout!=0), _IRQL_requires_max_(APC_LEVEL))
-_When_((Timeout!=NULL && *Timeout==0), _IRQL_requires_max_(DISPATCH_LEVEL))
+_When_((Timeout==NULL || Timeout->QuadPart!=0), _IRQL_requires_max_(APC_LEVEL))
+_When_((Timeout!=NULL && Timeout->QuadPart==0),
_IRQL_requires_max_(DISPATCH_LEVEL))
NTKERNELAPI
PLIST_ENTRY
NTAPI
Modified: trunk/reactos/include/ddk/wdm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=5738…
==============================================================================
--- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Wed Sep 26 09:40:44 2012
@@ -11399,8 +11399,8 @@
_In_ MEMORY_CACHING_TYPE CacheType);
_Must_inspect_result_
-_When_(AccessMode==0, _IRQL_requires_max_(DISPATCH_LEVEL))
-_When_(AccessMode==1, _Maybe_raises_SEH_exception_ _IRQL_requires_max_(APC_LEVEL))
+_When_(AccessMode==KernelMode, _IRQL_requires_max_(DISPATCH_LEVEL))
+_When_(AccessMode==UserMode, _Maybe_raises_SEH_exception_
_IRQL_requires_max_(APC_LEVEL))
NTKERNELAPI
PVOID
NTAPI
@@ -12618,8 +12618,8 @@
_Outptr_result_nullonfailure_
_At_(*DeviceObject,
__drv_allocatesMem(Mem)
- _When_((((_In_function_class_(DRIVER_INITIALIZE))
- ||(_In_function_class_(DRIVER_DISPATCH)))),
+ _When_(((_In_function_class_(DRIVER_INITIALIZE))
+ ||(_In_function_class_(DRIVER_DISPATCH))),
__drv_aliasesMem))
PDEVICE_OBJECT *DeviceObject);
Modified: trunk/reactos/include/ndk/rtlfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtlfuncs.h?rev…
==============================================================================
--- trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] Wed Sep 26 09:40:44 2012
@@ -726,6 +726,7 @@
VOID
);
+#ifdef NTOS_MODE_USER
//
// Heap Functions
//
@@ -805,13 +806,6 @@
IN PVOID P
);
-NTSYSAPI
-ULONG
-NTAPI
-RtlGetNtGlobalFlags(
- VOID
-);
-
ULONG
NTAPI
RtlGetProcessHeaps(
@@ -943,6 +937,27 @@
);
NTSYSAPI
+BOOLEAN
+NTAPI
+RtlValidateHeap(
+ HANDLE Heap,
+ ULONG Flags,
+ PVOID P
+);
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+RtlWalkHeap(
+ IN HANDLE HeapHandle,
+ IN PVOID HeapEntry
+);
+
+#define RtlGetProcessHeap() (NtCurrentPeb()->ProcessHeap)
+
+#endif // NTOS_MODE_USER
+
+NTSYSAPI
SIZE_T
NTAPI
RtlSizeHeap(
@@ -951,24 +966,6 @@
IN PVOID MemoryPointer
);
-NTSYSAPI
-BOOLEAN
-NTAPI
-RtlValidateHeap(
- HANDLE Heap,
- ULONG Flags,
- PVOID P
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlWalkHeap(
- IN HANDLE HeapHandle,
- IN PVOID HeapEntry
-);
-
-#define RtlGetProcessHeap() (NtCurrentPeb()->ProcessHeap)
//
// Security Functions
Modified: trunk/reactos/include/psdk/ntgdi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntgdi.h?rev=5…
==============================================================================
--- trunk/reactos/include/psdk/ntgdi.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/ntgdi.h [iso-8859-1] Wed Sep 26 09:40:44 2012
@@ -193,8 +193,9 @@
_Out_opt_ OUTLINETEXTMETRICW *potmw,
_Out_ TMDIFF *ptmd);
-W32KAPI
-BOOL _Success_(return != FALSE)
+_Success_(return != FALSE)
+W32KAPI
+BOOL
APIENTRY
NtGdiGetAndSetDCDword(
_In_ HDC hdc,
@@ -404,8 +405,9 @@
OUT FLONG *pflInfo
);
-W32KAPI
-INT _Success_(return != 0)
+_Success_(return != 0)
+W32KAPI
+INT
APIENTRY
NtGdiDescribePixelFormat(
_In_ HDC hdc,
@@ -1646,8 +1648,9 @@
_In_ DWORD dwxScale,
_In_ DWORD dwyScale);
-W32KAPI
-BOOL _Success_(return != FALSE)
+_Success_(return != FALSE)
+W32KAPI
+BOOL
APIENTRY
NtGdiGetMiterLimit(
_In_ HDC hdc,
@@ -2357,8 +2360,9 @@
_In_ INT x,
_In_ INT y);
-W32KAPI
-BOOL _Success_(return != FALSE)
+_Success_(return != FALSE)
+W32KAPI
+BOOL
APIENTRY
NtGdiMoveTo(
_In_ HDC hdc,
@@ -2405,8 +2409,9 @@
_In_ DWORD dwRop,
_In_ DWORD dwBackColor);
-W32KAPI
-BOOL _Success_(return != FALSE)
+_Success_(return != FALSE)
+W32KAPI
+BOOL
APIENTRY
NtGdiSetBrushOrg(
_In_ HDC hdc,
Modified: trunk/reactos/include/psdk/winddi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winddi.h?rev=…
==============================================================================
--- trunk/reactos/include/psdk/winddi.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winddi.h [iso-8859-1] Wed Sep 26 09:40:44 2012
@@ -1256,7 +1256,7 @@
_In_ ULONG ulTag);
_Must_inspect_result_
-_Ret_opt_bytecount_(cj)
+_Ret_opt_bytecount_(cjMemSize)
WIN32KAPI
PVOID
APIENTRY
@@ -1558,6 +1558,7 @@
EngDeleteWnd(
_In_ _Post_ptr_invalid_ WNDOBJ *pwo);
+_Success_(return==0)
WIN32KAPI
DWORD
APIENTRY
Modified: trunk/reactos/include/xdk/iofuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/iofuncs.h?rev=…
==============================================================================
--- trunk/reactos/include/xdk/iofuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/iofuncs.h [iso-8859-1] Wed Sep 26 09:40:44 2012
@@ -821,8 +821,8 @@
_Outptr_result_nullonfailure_
_At_(*DeviceObject,
__drv_allocatesMem(Mem)
- _When_((((_In_function_class_(DRIVER_INITIALIZE))
- ||(_In_function_class_(DRIVER_DISPATCH)))),
+ _When_(((_In_function_class_(DRIVER_INITIALIZE))
+ ||(_In_function_class_(DRIVER_DISPATCH))),
__drv_aliasesMem))
PDEVICE_OBJECT *DeviceObject);
Modified: trunk/reactos/include/xdk/kefuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/kefuncs.h?rev=…
==============================================================================
--- trunk/reactos/include/xdk/kefuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/kefuncs.h [iso-8859-1] Wed Sep 26 09:40:44 2012
@@ -640,8 +640,8 @@
_Inout_ PLIST_ENTRY Entry);
_IRQL_requires_min_(PASSIVE_LEVEL)
-_When_((Timeout==NULL || *Timeout!=0), _IRQL_requires_max_(APC_LEVEL))
-_When_((Timeout!=NULL && *Timeout==0), _IRQL_requires_max_(DISPATCH_LEVEL))
+_When_((Timeout==NULL || Timeout->QuadPart!=0), _IRQL_requires_max_(APC_LEVEL))
+_When_((Timeout!=NULL && Timeout->QuadPart==0),
_IRQL_requires_max_(DISPATCH_LEVEL))
NTKERNELAPI
PLIST_ENTRY
NTAPI
Modified: trunk/reactos/include/xdk/mmfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/mmfuncs.h?rev=…
==============================================================================
--- trunk/reactos/include/xdk/mmfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/mmfuncs.h [iso-8859-1] Wed Sep 26 09:40:44 2012
@@ -298,8 +298,8 @@
_In_ MEMORY_CACHING_TYPE CacheType);
_Must_inspect_result_
-_When_(AccessMode==0, _IRQL_requires_max_(DISPATCH_LEVEL))
-_When_(AccessMode==1, _Maybe_raises_SEH_exception_ _IRQL_requires_max_(APC_LEVEL))
+_When_(AccessMode==KernelMode, _IRQL_requires_max_(DISPATCH_LEVEL))
+_When_(AccessMode==UserMode, _Maybe_raises_SEH_exception_
_IRQL_requires_max_(APC_LEVEL))
NTKERNELAPI
PVOID
NTAPI
@@ -574,59 +574,6 @@
MmAddPhysicalMemory(
_In_ PPHYSICAL_ADDRESS StartAddress,
_Inout_ PLARGE_INTEGER NumberOfBytes);
-
-_Must_inspect_result_
-_IRQL_requires_max_(DISPATCH_LEVEL)
-_When_(return != NULL, _Post_writable_byte_size_(NumberOfBytes))
-NTKERNELAPI
-PVOID
-NTAPI
-MmAllocateContiguousMemory(
- _In_ SIZE_T NumberOfBytes,
- _In_ PHYSICAL_ADDRESS HighestAcceptableAddress);
-
-_Must_inspect_result_
-_IRQL_requires_max_(DISPATCH_LEVEL)
-_When_(return != NULL, _Post_writable_byte_size_(NumberOfBytes))
-NTKERNELAPI
-PVOID
-NTAPI
-MmAllocateContiguousMemorySpecifyCache(
- _In_ SIZE_T NumberOfBytes,
- _In_ PHYSICAL_ADDRESS LowestAcceptableAddress,
- _In_ PHYSICAL_ADDRESS HighestAcceptableAddress,
- _In_opt_ PHYSICAL_ADDRESS BoundaryAddressMultiple,
- _In_ MEMORY_CACHING_TYPE CacheType);
-
-_Must_inspect_result_
-_IRQL_requires_max_(DISPATCH_LEVEL)
-_When_(return != NULL, _Post_writable_byte_size_(NumberOfBytes))
-NTKERNELAPI
-PVOID
-NTAPI
-MmAllocateContiguousMemorySpecifyCacheNode(
- _In_ SIZE_T NumberOfBytes,
- _In_ PHYSICAL_ADDRESS LowestAcceptableAddress,
- _In_ PHYSICAL_ADDRESS HighestAcceptableAddress,
- _In_opt_ PHYSICAL_ADDRESS BoundaryAddressMultiple,
- _In_ MEMORY_CACHING_TYPE CacheType,
- _In_ NODE_REQUIREMENT PreferredNode);
-
-_IRQL_requires_max_(DISPATCH_LEVEL)
-NTKERNELAPI
-VOID
-NTAPI
-MmFreeContiguousMemory(
- _In_ PVOID BaseAddress);
-
-_IRQL_requires_max_(DISPATCH_LEVEL)
-NTKERNELAPI
-VOID
-NTAPI
-MmFreeContiguousMemorySpecifyCache(
- _In_reads_bytes_(NumberOfBytes) PVOID BaseAddress,
- _In_ SIZE_T NumberOfBytes,
- _In_ MEMORY_CACHING_TYPE CacheType);
$endif (_NTDDK_)
$if (_NTIFS_)