mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
- 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 svn path=/trunk/; revision=35803
This commit is contained in:
parent
8e2e5b6501
commit
5ae7cefa81
|
@ -183,7 +183,7 @@ VideoPortDDCMonitorHelper(
|
|||
|
||||
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);
|
||||
|
|
|
@ -875,7 +875,7 @@ VideoPortSetRegistryParameters(
|
|||
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,
|
||||
|
|
|
@ -1569,7 +1569,7 @@ IoFlushAdapterBuffers(
|
|||
PHYSICAL_ADDRESS PhysicalAddress;
|
||||
PPFN_NUMBER MdlPagesPtr;
|
||||
|
||||
ASSERT_IRQL(DISPATCH_LEVEL);
|
||||
ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL);
|
||||
|
||||
if (AdapterObject != NULL && !AdapterObject->MasterDevice)
|
||||
{
|
||||
|
|
|
@ -1569,7 +1569,7 @@ IoFlushAdapterBuffers(
|
|||
PHYSICAL_ADDRESS PhysicalAddress;
|
||||
PPFN_NUMBER MdlPagesPtr;
|
||||
|
||||
ASSERT_IRQL(DISPATCH_LEVEL);
|
||||
ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL);
|
||||
|
||||
if (AdapterObject != NULL && !AdapterObject->MasterDevice)
|
||||
{
|
||||
|
|
|
@ -16,11 +16,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 @@ RtlAssert(
|
|||
|
||||
/* 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 @@ RtlAssert(
|
|||
#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 @@ RtlAssert(
|
|||
#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 @@ RtlAssert(
|
|||
#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 */
|
||||
|
|
|
@ -27,15 +27,6 @@
|
|||
#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.
|
||||
* elem is set to NULL if the list is run thru without breaking out or if list is empty.
|
||||
*/
|
||||
|
|
|
@ -131,7 +131,7 @@ FASTCALL
|
|||
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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -225,7 +225,7 @@ ExAllocatePoolWithQuotaTag (IN POOL_TYPE PoolType,
|
|||
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))
|
||||
{
|
||||
|
|
|
@ -91,7 +91,7 @@ ExAllocatePagedPoolWithTag (IN POOL_TYPE PoolType,
|
|||
else
|
||||
align = 0;
|
||||
|
||||
ASSERT_IRQL(APC_LEVEL);
|
||||
ASSERT_IRQL_LESS_OR_EQUAL(APC_LEVEL);
|
||||
|
||||
return RPoolAlloc ( MmPagedPool, NumberOfBytes, Tag, align );
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ ExAllocatePagedPoolWithTag (IN POOL_TYPE PoolType,
|
|||
VOID STDCALL
|
||||
ExFreePagedPool(IN PVOID Block)
|
||||
{
|
||||
ASSERT_IRQL(APC_LEVEL);
|
||||
ASSERT_IRQL_LESS_OR_EQUAL(APC_LEVEL);
|
||||
RPoolFree ( MmPagedPool, Block );
|
||||
}
|
||||
|
||||
|
|
|
@ -349,7 +349,7 @@ PoSetPowerState(IN PDEVICE_OBJECT DeviceObject,
|
|||
{
|
||||
POWER_STATE ps;
|
||||
|
||||
ASSERT_IRQL(DISPATCH_LEVEL);
|
||||
ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL);
|
||||
|
||||
ps.SystemState = PowerSystemWorking; // Fully on
|
||||
ps.DeviceState = PowerDeviceD0; // Fully on
|
||||
|
|
|
@ -153,7 +153,7 @@ IntEngWindowChanged(
|
|||
PLIST_ENTRY CurrentEntry;
|
||||
WNDGDI *Current;
|
||||
|
||||
ASSERT_IRQL(PASSIVE_LEVEL);
|
||||
ASSERT_IRQL_LESS_OR_EQUAL(PASSIVE_LEVEL);
|
||||
|
||||
CurrentEntry = Window->WndObjListHead.Flink;
|
||||
while (CurrentEntry != &Window->WndObjListHead)
|
||||
|
|
|
@ -134,7 +134,7 @@ EngInitializeSafeSemaphore(
|
|||
{
|
||||
/* 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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue