Author: sginsberg
Date: Sat Aug 30 10:14:12 2008
New Revision: 35803
URL:
http://svn.reactos.org/svn/reactos?rev=35803&view=rev
Log:
- Get rid of ASSERT_IRQL, deprecated since long ago
- Remove various dead stuff from headers, and move ASSERT_IRQL_LESS_OR_EQUAL,
ASSERT_IRQL_EQUAL and ASSERT_IRQL_LESS to global debug.h
Modified:
trunk/reactos/drivers/video/videoprt/ddc.c
trunk/reactos/drivers/video/videoprt/videoprt.c
trunk/reactos/hal/halppc/generic/dma.c
trunk/reactos/hal/halx86/generic/dma.c
trunk/reactos/include/reactos/debug.h
trunk/reactos/include/reactos/helper.h
trunk/reactos/ntoskrnl/ex/fmutex.c
trunk/reactos/ntoskrnl/include/internal/debug.h
trunk/reactos/ntoskrnl/mm/pool.c
trunk/reactos/ntoskrnl/mm/ppool.c
trunk/reactos/ntoskrnl/po/power.c
trunk/reactos/subsystems/win32/win32k/eng/engwindow.c
trunk/reactos/subsystems/win32/win32k/eng/semaphor.c
Modified: trunk/reactos/drivers/video/videoprt/ddc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/ddc…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/ddc.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/video/videoprt/ddc.c [iso-8859-1] Sat Aug 30 10:14:12 2008
@@ -183,7 +183,7 @@
TRACE_(VIDEOPRT, "VideoPortDDCMonitorHelper()\n");
- ASSERT_IRQL(PASSIVE_LEVEL);
+ ASSERT_IRQL_LESS_OR_EQUAL(PASSIVE_LEVEL);
if (ddc->Size != sizeof (ddc))
{
WARN_(VIDEOPRT, "ddc->Size != %d (%d)\n", sizeof (ddc),
ddc->Size);
Modified: trunk/reactos/drivers/video/videoprt/videoprt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/vid…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/videoprt.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/video/videoprt/videoprt.c [iso-8859-1] Sat Aug 30 10:14:12 2008
@@ -875,7 +875,7 @@
TRACE_(VIDEOPRT, "VideoPortSetRegistryParameters ParameterName %S, RegPath:
%wZ\n",
ValueName,
&VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension)->RegistryPath);
- ASSERT_IRQL(PASSIVE_LEVEL);
+ ASSERT_IRQL_LESS_OR_EQUAL(PASSIVE_LEVEL);
Status = RtlWriteRegistryValue(
RTL_REGISTRY_ABSOLUTE,
VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension)->RegistryPath.Buffer,
Modified: trunk/reactos/hal/halppc/generic/dma.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halppc/generic/dma.c?r…
==============================================================================
--- trunk/reactos/hal/halppc/generic/dma.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halppc/generic/dma.c [iso-8859-1] Sat Aug 30 10:14:12 2008
@@ -1569,7 +1569,7 @@
PHYSICAL_ADDRESS PhysicalAddress;
PPFN_NUMBER MdlPagesPtr;
- ASSERT_IRQL(DISPATCH_LEVEL);
+ ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL);
if (AdapterObject != NULL && !AdapterObject->MasterDevice)
{
Modified: trunk/reactos/hal/halx86/generic/dma.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/dma.c?r…
==============================================================================
--- trunk/reactos/hal/halx86/generic/dma.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/generic/dma.c [iso-8859-1] Sat Aug 30 10:14:12 2008
@@ -1569,7 +1569,7 @@
PHYSICAL_ADDRESS PhysicalAddress;
PPFN_NUMBER MdlPagesPtr;
- ASSERT_IRQL(DISPATCH_LEVEL);
+ ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL);
if (AdapterObject != NULL && !AdapterObject->MasterDevice)
{
Modified: trunk/reactos/include/reactos/debug.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/debug.h?re…
==============================================================================
--- trunk/reactos/include/reactos/debug.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/debug.h [iso-8859-1] Sat Aug 30 10:14:12 2008
@@ -15,11 +15,6 @@
#ifndef __INTERNAL_DEBUG
#define __INTERNAL_DEBUG
-
-/* FIXME: should probably remove this later */
-#if !defined(CHECKED) && !defined(NDEBUG)
-#define CHECKED
-#endif
/* Define DbgPrint/DbgPrintEx/RtlAssert unless the NDK is used */
#if !defined(_RTLFUNCS_H) && (!defined(_NTDDK_) || !defined(__NTDDK_H))
@@ -87,13 +82,11 @@
/* These are always printed */
#define DPRINT1 DbgPrint("(%s:%d) ",__FILE__,__LINE__), DbgPrint
- #define CHECKPOINT1 do { DbgPrint("%s:%d\n",__FILE__,__LINE__); }
while(0);
/* These are printed only if NDEBUG is NOT defined */
#ifndef NDEBUG
#define DPRINT DbgPrint("(%s:%d) ",__FILE__,__LINE__), DbgPrint
- #define CHECKPOINT do { DbgPrint("%s:%d\n",__FILE__,__LINE__); }
while(0);
#else
#ifdef _MSC_VER
@@ -104,7 +97,6 @@
#else
#define DPRINT(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#endif
- #define CHECKPOINT
#endif
#define UNIMPLEMENTED DbgPrint("WARNING: %s at %s:%d is
UNIMPLEMENTED!\n",__FUNCTION__,__FILE__,__LINE__);
@@ -122,8 +114,6 @@
#define DPRINT1(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#define DPRINT(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
- #define CHECKPOINT1
- #define CHECKPOINT
#define UNIMPLEMENTED
#define ERR_(ch, ...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
@@ -132,17 +122,8 @@
#define INFO_(ch, ...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#endif
-/*
- * FUNCTION: Assert a maximum value for the current irql
- * ARGUMENTS:
- * x = Maximum irql
- */
-#define ASSERT_IRQL(x) assert(KeGetCurrentIrql()<=(x))
-#define assert_irql(x) assert(KeGetCurrentIrql()<=(x))
-
-#ifndef KEBUGCHECK
-#define KEBUGCHECK(a) DbgPrint("KeBugCheck (0x%X) at %s:%i\n", a,
__FILE__,__LINE__), KeBugCheck(a)
-#define KEBUGCHECKEX(a,b,c,d,e) DbgPrint("KeBugCheckEx (0x%X, 0x%X, 0x%X, 0x%X,
0x%X) at %s:%i\n", a, b, c, d, e, __FILE__,__LINE__), KeBugCheckEx(a,b,c,d,e)
-#endif
+#define ASSERT_IRQL_LESS_OR_EQUAL(x) ASSERT(KeGetCurrentIrql()<=(x))
+#define ASSERT_IRQL_EQUAL(x) ASSERT(KeGetCurrentIrql()==(x))
+#define ASSERT_IRQL_LESS(x) ASSERT(KeGetCurrentIrql()<(x))
#endif /* __INTERNAL_DEBUG */
Modified: trunk/reactos/include/reactos/helper.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/helper.h?r…
==============================================================================
--- trunk/reactos/include/reactos/helper.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/helper.h [iso-8859-1] Sat Aug 30 10:14:12 2008
@@ -25,15 +25,6 @@
#ifndef PAGE_ROUND_UP
#define PAGE_ROUND_UP(x) ( (((ULONG_PTR)(x)) + PAGE_SIZE-1) & (~(PAGE_SIZE-1)) )
-#endif
-
-#define ABS_VALUE(V) (((V) < 0) ? -(V) : (V))
-
-#define RtlRosMin3(X,Y,Z) (((X) < (Y)) ? RtlRosMin(X,Z) : RtlRosMin(Y,Z))
-
-#ifndef KEBUGCHECK
-#define KEBUGCHECKEX(a,b,c,d,e) DbgPrint("KeBugCheckEx at
%s:%i\n",__FILE__,__LINE__), KeBugCheckEx(a,b,c,d,e)
-#define KEBUGCHECK(a) DbgPrint("KeBugCheck at %s:%i\n",__FILE__,__LINE__),
KeBugCheck(a)
#endif
/* iterate through the list using a list entry.
Modified: trunk/reactos/ntoskrnl/ex/fmutex.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/fmutex.c?rev=3…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/fmutex.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/fmutex.c [iso-8859-1] Sat Aug 30 10:14:12 2008
@@ -131,7 +131,7 @@
ExReleaseFastMutex(IN OUT PFAST_MUTEX FastMutex)
{
KIRQL OldIrql;
- ASSERT_IRQL(APC_LEVEL);
+ ASSERT_IRQL_LESS_OR_EQUAL(APC_LEVEL);
/* Erase the owner */
FastMutex->Owner = NULL;
Modified: trunk/reactos/ntoskrnl/include/internal/debug.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/debug.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/debug.h [iso-8859-1] Sat Aug 30 10:14:12 2008
@@ -15,27 +15,11 @@
* Define NASSERT before including this header to disable assertions
*/
-#include <reactos/debug.h>
#ifndef __NTOSKRNL_DEBUG
#define __NTOSKRNL_DEBUG
#include <reactos/debug.h>
-#if defined(_MSC_VER) && (_MSC_VER < 1300)
-/* TODO: Verify which version the MS compiler learned the __FUNCTION__ macro */
-#define __FUNCTION__ "<unknown>"
-#endif
-
-#define CPRINT DPRINT1
-
-/*
- * FUNCTION: Assert a maximum value for the current irql
- * ARGUMENTS:
- * x = Maximum irql
- */
-#define ASSERT_IRQL_LESS_OR_EQUAL(x) ASSERT(KeGetCurrentIrql()<=(x))
-#define ASSERT_IRQL_EQUAL(x) ASSERT(KeGetCurrentIrql()==(x))
-#define ASSERT_IRQL_LESS(x) ASSERT(KeGetCurrentIrql()<(x))
#endif /* __NTOSKRNL_DEBUG */
Modified: trunk/reactos/ntoskrnl/mm/pool.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/pool.c?rev=358…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/pool.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/pool.c [iso-8859-1] Sat Aug 30 10:14:12 2008
@@ -225,7 +225,7 @@
VOID STDCALL
ExFreePool(IN PVOID Block)
{
- ASSERT_IRQL(DISPATCH_LEVEL);
+ ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL);
if (Block >= MmPagedPoolBase && (char*)Block < ((char*)MmPagedPoolBase +
MmPagedPoolSize))
{
Modified: trunk/reactos/ntoskrnl/mm/ppool.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ppool.c?rev=35…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ppool.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ppool.c [iso-8859-1] Sat Aug 30 10:14:12 2008
@@ -91,7 +91,7 @@
else
align = 0;
- ASSERT_IRQL(APC_LEVEL);
+ ASSERT_IRQL_LESS_OR_EQUAL(APC_LEVEL);
return RPoolAlloc ( MmPagedPool, NumberOfBytes, Tag, align );
}
@@ -99,7 +99,7 @@
VOID STDCALL
ExFreePagedPool(IN PVOID Block)
{
- ASSERT_IRQL(APC_LEVEL);
+ ASSERT_IRQL_LESS_OR_EQUAL(APC_LEVEL);
RPoolFree ( MmPagedPool, Block );
}
Modified: trunk/reactos/ntoskrnl/po/power.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/po/power.c?rev=35…
==============================================================================
--- trunk/reactos/ntoskrnl/po/power.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/po/power.c [iso-8859-1] Sat Aug 30 10:14:12 2008
@@ -349,7 +349,7 @@
{
POWER_STATE ps;
- ASSERT_IRQL(DISPATCH_LEVEL);
+ ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL);
ps.SystemState = PowerSystemWorking; // Fully on
ps.DeviceState = PowerDeviceD0; // Fully on
Modified: trunk/reactos/subsystems/win32/win32k/eng/engwindow.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/engwindow.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/engwindow.c [iso-8859-1] Sat Aug 30 10:14:12
2008
@@ -153,7 +153,7 @@
PLIST_ENTRY CurrentEntry;
WNDGDI *Current;
- ASSERT_IRQL(PASSIVE_LEVEL);
+ ASSERT_IRQL_LESS_OR_EQUAL(PASSIVE_LEVEL);
CurrentEntry = Window->WndObjListHead.Flink;
while (CurrentEntry != &Window->WndObjListHead)
Modified: trunk/reactos/subsystems/win32/win32k/eng/semaphor.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/semaphor.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/semaphor.c [iso-8859-1] Sat Aug 30 10:14:12
2008
@@ -134,7 +134,7 @@
{
/* Wait for the other thread to create the semaphore */
ASSERT(Semaphore->lCount > 1);
- ASSERT_IRQL(PASSIVE_LEVEL);
+ ASSERT_IRQL_LESS_OR_EQUAL(PASSIVE_LEVEL);
while (Semaphore->hsem == NULL);
}