diff --git a/reactos/ntoskrnl/cc/pin.c b/reactos/ntoskrnl/cc/pin.c index 8d377771b26..fa9d68bd45e 100644 --- a/reactos/ntoskrnl/cc/pin.c +++ b/reactos/ntoskrnl/cc/pin.c @@ -1,4 +1,4 @@ -/* $Id: pin.c,v 1.17 2004/08/25 15:08:29 navaraf Exp $ +/* $Id: pin.c,v 1.18 2004/10/22 20:11:11 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -48,7 +48,7 @@ CcMapData (IN PFILE_OBJECT FileObject, ReadOffset = (ULONG)FileOffset->QuadPart; Bcb = FileObject->SectionObjectPointer->SharedCacheMap; - assert(Bcb); + ASSERT(Bcb); DPRINT("AllocationSize %d, FileSize %d\n", (ULONG)Bcb->AllocationSize.QuadPart, diff --git a/reactos/ntoskrnl/cc/view.c b/reactos/ntoskrnl/cc/view.c index f8c7f98f4e5..43279a7e999 100644 --- a/reactos/ntoskrnl/cc/view.c +++ b/reactos/ntoskrnl/cc/view.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: view.c,v 1.78 2004/09/19 12:11:44 hbirr Exp $ +/* $Id: view.c,v 1.79 2004/10/22 20:11:12 ekohl Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/cc/view.c @@ -185,7 +185,7 @@ CcRosFlushDirtyPages(ULONG Target, PULONG Count) { continue; } - assert(current->Dirty); + ASSERT(current->Dirty); if (current->ReferenceCount > 1) { ExReleaseFastMutex(¤t->Lock); @@ -202,7 +202,7 @@ CcRosFlushDirtyPages(ULONG Target, PULONG Count) else { (*Count) += PagesPerSegment; - Target -= PagesPerSegment; + Target -= PagesPerSegment; } ExAcquireFastMutex(&ViewLock); current_entry = DirtySegmentListHead.Flink; @@ -319,7 +319,7 @@ CcRosReleaseCacheSegment(PBCB Bcb, BOOLEAN WasDirty = CacheSeg->Dirty; KIRQL oldIrql; - assert(Bcb); + ASSERT(Bcb); DPRINT("CcReleaseCacheSegment(Bcb %x, CacheSeg %x, Valid %d)\n", Bcb, CacheSeg, Valid); @@ -364,7 +364,7 @@ CcRosLookupCacheSegment(PBCB Bcb, ULONG FileOffset) PCACHE_SEGMENT current; KIRQL oldIrql; - assert(Bcb); + ASSERT(Bcb); DPRINT("CcRosLookupCacheSegment(Bcb %x, FileOffset %d)\n", Bcb, FileOffset); @@ -394,7 +394,7 @@ CcRosMarkDirtyCacheSegment(PBCB Bcb, ULONG FileOffset) PCACHE_SEGMENT CacheSeg; KIRQL oldIrql; - assert(Bcb); + ASSERT(Bcb); DPRINT("CcRosMarkDirtyCacheSegment(Bcb %x, FileOffset %d)\n", Bcb, FileOffset); @@ -431,7 +431,7 @@ CcRosUnmapCacheSegment(PBCB Bcb, ULONG FileOffset, BOOLEAN NowDirty) BOOLEAN WasDirty; KIRQL oldIrql; - assert(Bcb); + ASSERT(Bcb); DPRINT("CcRosUnmapCacheSegment(Bcb %x, FileOffset %d, NowDirty %d)\n", Bcb, FileOffset, NowDirty); @@ -488,8 +488,8 @@ CcRosCreateCacheSegment(PBCB Bcb, #else #endif PHYSICAL_ADDRESS BoundaryAddressMultiple; - - assert(Bcb); + + ASSERT(Bcb); DPRINT("CcRosCreateCacheSegment()\n"); @@ -639,7 +639,7 @@ CcRosGetCacheSegmentChain(PBCB Bcb, PCACHE_SEGMENT* CacheSegList; PCACHE_SEGMENT Previous = NULL; - assert(Bcb); + ASSERT(Bcb); DPRINT("CcRosGetCacheSegmentChain()\n"); @@ -702,7 +702,7 @@ CcRosGetCacheSegment(PBCB Bcb, PCACHE_SEGMENT current; NTSTATUS Status; - assert(Bcb); + ASSERT(Bcb); DPRINT("CcRosGetCacheSegment()\n"); @@ -744,7 +744,7 @@ CcRosRequestCacheSegment(PBCB Bcb, { ULONG BaseOffset; - assert(Bcb); + ASSERT(Bcb); if ((FileOffset % Bcb->CacheSegmentSize) != 0) { @@ -766,7 +766,7 @@ STATIC VOID CcFreeCachePage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address, PFN_TYPE Page, SWAPENTRY SwapEntry, BOOLEAN Dirty) { - assert(SwapEntry == 0); + ASSERT(SwapEntry == 0); if (Page != 0) { MmReleasePageMemoryConsumer(MC_CACHE, Page); @@ -829,7 +829,7 @@ CcRosFreeCacheSegment(PBCB Bcb, PCACHE_SEGMENT CacheSeg) NTSTATUS Status; KIRQL oldIrql; - assert(Bcb); + ASSERT(Bcb); DPRINT("CcRosFreeCacheSegment(Bcb %x, CacheSeg %x)\n", Bcb, CacheSeg); @@ -873,18 +873,14 @@ CcFlushCache(IN PSECTION_OBJECT_POINTERS SectionObjectPointers, if (SectionObjectPointers && SectionObjectPointers->SharedCacheMap) { Bcb = (PBCB)SectionObjectPointers->SharedCacheMap; - assert(Bcb); + ASSERT(Bcb); if (FileOffset) { Offset = *FileOffset; } else { -#if defined(__GNUC__) - Offset.QuadPart = 0LL; -#else - Offset.QuadPart = 0; -#endif + Offset.QuadPart = (LONGLONG)0; Length = Bcb->FileSize.u.LowPart; } @@ -945,8 +941,8 @@ CcRosDeleteFileCache(PFILE_OBJECT FileObject, PBCB Bcb) LIST_ENTRY FreeList; KIRQL oldIrql; - assert(Bcb); - + ASSERT(Bcb); + Bcb->RefCount++; ExReleaseFastMutex(&ViewLock); @@ -1006,17 +1002,17 @@ VOID CcRosReferenceCache(PFILE_OBJECT FileObject) PBCB Bcb; ExAcquireFastMutex(&ViewLock); Bcb = (PBCB)FileObject->SectionObjectPointer->SharedCacheMap; - assert(Bcb); + ASSERT(Bcb); if (Bcb->RefCount == 0) { - assert(Bcb->BcbRemoveListEntry.Flink != NULL); + ASSERT(Bcb->BcbRemoveListEntry.Flink != NULL); RemoveEntryList(&Bcb->BcbRemoveListEntry); Bcb->BcbRemoveListEntry.Flink = NULL; } else { - assert(Bcb->BcbRemoveListEntry.Flink == NULL); + ASSERT(Bcb->BcbRemoveListEntry.Flink == NULL); } Bcb->RefCount++; ExReleaseFastMutex(&ViewLock); @@ -1045,7 +1041,7 @@ VOID CcRosDereferenceCache(PFILE_OBJECT FileObject) PBCB Bcb; ExAcquireFastMutex(&ViewLock); Bcb = (PBCB)FileObject->SectionObjectPointer->SharedCacheMap; - assert(Bcb); + ASSERT(Bcb); if (Bcb->RefCount > 0) { Bcb->RefCount--; @@ -1155,13 +1151,13 @@ CcRosInitializeFileCache(PFILE_OBJECT FileObject, ExAcquireFastMutex(&ViewLock); if (Bcb == NULL) { - Bcb = ExAllocateFromNPagedLookasideList(&BcbLookasideList); + Bcb = ExAllocateFromNPagedLookasideList(&BcbLookasideList); if (Bcb == NULL) { ExReleaseFastMutex(&ViewLock); return(STATUS_UNSUCCESSFUL); } - memset(Bcb, 0, sizeof(BCB)); + memset(Bcb, 0, sizeof(BCB)); ObReferenceObjectByPointer(FileObject, FILE_ALL_ACCESS, NULL, @@ -1204,7 +1200,7 @@ CcGetFileObjectFromSectionPtrs(IN PSECTION_OBJECT_POINTERS SectionObjectPointers if (SectionObjectPointers && SectionObjectPointers->SharedCacheMap) { Bcb = (PBCB)SectionObjectPointers->SharedCacheMap; - assert(Bcb); + ASSERT(Bcb); return Bcb->FileObject; } return NULL; @@ -1223,11 +1219,7 @@ CmLazyCloseThreadMain(PVOID Ignored) while (1) { -#if defined(__GNUC__) - Timeout.QuadPart += 100000000LL; // 10sec -#else - Timeout.QuadPart += 100000000; // 10sec -#endif + Timeout.QuadPart += (LONGLONG)100000000; // 10sec Status = KeWaitForSingleObject(&LazyCloseThreadEvent, 0, KernelMode, diff --git a/reactos/ntoskrnl/cm/regfile.c b/reactos/ntoskrnl/cm/regfile.c index 912ad8acee6..d88b5be932b 100644 --- a/reactos/ntoskrnl/cm/regfile.c +++ b/reactos/ntoskrnl/cm/regfile.c @@ -32,7 +32,7 @@ CmiCalcChecksum(PULONG Buffer); VOID CmiCreateDefaultHiveHeader(PHIVE_HEADER Header) { - assert(Header); + ASSERT(Header); RtlZeroMemory(Header, sizeof(HIVE_HEADER)); Header->BlockId = REG_HIVE_ID; Header->UpdateCounter1 = 0; @@ -54,7 +54,7 @@ CmiCreateDefaultHiveHeader(PHIVE_HEADER Header) VOID CmiCreateDefaultBinHeader(PHBIN BinHeader) { - assert(BinHeader); + ASSERT(BinHeader); RtlZeroMemory(BinHeader, sizeof(HBIN)); BinHeader->HeaderId = REG_BIN_ID; BinHeader->DateModified.u.LowPart = 0; @@ -66,7 +66,7 @@ CmiCreateDefaultBinHeader(PHBIN BinHeader) VOID CmiCreateDefaultRootKeyCell(PKEY_CELL RootKeyCell) { - assert(RootKeyCell); + ASSERT(RootKeyCell); RtlZeroMemory(RootKeyCell, sizeof(KEY_CELL)); RootKeyCell->CellSize = -sizeof(KEY_CELL); RootKeyCell->Id = REG_KEY_CELL_ID; @@ -90,13 +90,13 @@ CmiVerifyBinHeader(PHBIN BinHeader) if (CmiDoVerify) { - assert(BinHeader); + ASSERT(BinHeader); if (BinHeader->HeaderId != REG_BIN_ID) { DbgPrint("Bin header ID is %.08x (should be %.08x)\n", BinHeader->HeaderId, REG_BIN_ID); - assert(BinHeader->HeaderId == REG_BIN_ID); + ASSERT(BinHeader->HeaderId == REG_BIN_ID); } //BinHeader->DateModified.dwLowDateTime @@ -108,7 +108,7 @@ CmiVerifyBinHeader(PHBIN BinHeader) { DbgPrint("BinSize is %.08x (should be a multiple of %.08x)\n", BinHeader->BinSize, REG_BLOCK_SIZE); - assert(BinHeader->BinSize % REG_BLOCK_SIZE == 0); + ASSERT(BinHeader->BinSize % REG_BLOCK_SIZE == 0); } } @@ -121,20 +121,20 @@ CmiVerifyKeyCell(PKEY_CELL KeyCell) if (CmiDoVerify) { - assert(KeyCell); + ASSERT(KeyCell); if (KeyCell->CellSize == 0) { DbgPrint("CellSize is %d (must not be 0)\n", KeyCell->CellSize); - assert(KeyCell->CellSize != 0); + ASSERT(KeyCell->CellSize != 0); } if (KeyCell->Id != REG_KEY_CELL_ID) { DbgPrint("Id is %.08x (should be %.08x)\n", KeyCell->Id, REG_KEY_CELL_ID); - assert(KeyCell->Id == REG_KEY_CELL_ID); + ASSERT(KeyCell->Id == REG_KEY_CELL_ID); } //KeyCell->Flags; @@ -145,14 +145,14 @@ CmiVerifyKeyCell(PKEY_CELL KeyCell) { DbgPrint("ParentKeyOffset is %d (must not be < 0)\n", KeyCell->ParentKeyOffset); - assert(KeyCell->ParentKeyOffset >= 0); + ASSERT(KeyCell->ParentKeyOffset >= 0); } if (KeyCell->NumberOfSubKeys < 0) { DbgPrint("NumberOfSubKeys is %d (must not be < 0)\n", KeyCell->NumberOfSubKeys); - assert(KeyCell->NumberOfSubKeys >= 0); + ASSERT(KeyCell->NumberOfSubKeys >= 0); } //KeyCell->HashTableOffset; @@ -161,7 +161,7 @@ CmiVerifyKeyCell(PKEY_CELL KeyCell) { DbgPrint("NumberOfValues is %d (must not be < 0)\n", KeyCell->NumberOfValues); - assert(KeyCell->NumberOfValues >= 0); + ASSERT(KeyCell->NumberOfValues >= 0); } //KeyCell->ValuesOffset = -1; @@ -170,7 +170,7 @@ CmiVerifyKeyCell(PKEY_CELL KeyCell) { DbgPrint("SecurityKeyOffset is %d (must not be < 0)\n", KeyCell->SecurityKeyOffset); - assert(KeyCell->SecurityKeyOffset >= 0); + ASSERT(KeyCell->SecurityKeyOffset >= 0); } //KeyCell->ClassNameOffset = -1; @@ -195,7 +195,7 @@ CmiVerifyRootKeyCell(PKEY_CELL RootKeyCell) { DbgPrint("Flags is %.08x (should be %.08x)\n", RootKeyCell->Flags, REG_KEY_ROOT_CELL | REG_KEY_NAME_PACKED); - assert(!(RootKeyCell->Flags & (REG_KEY_ROOT_CELL | REG_KEY_NAME_PACKED))); + ASSERT(!(RootKeyCell->Flags & (REG_KEY_ROOT_CELL | REG_KEY_NAME_PACKED))); } } @@ -208,20 +208,20 @@ CmiVerifyValueCell(PVALUE_CELL ValueCell) if (CmiDoVerify) { - assert(ValueCell); + ASSERT(ValueCell); if (ValueCell->CellSize == 0) { DbgPrint("CellSize is %d (must not be 0)\n", ValueCell->CellSize); - assert(ValueCell->CellSize != 0); + ASSERT(ValueCell->CellSize != 0); } if (ValueCell->Id != REG_VALUE_CELL_ID) { DbgPrint("Id is %.08x (should be %.08x)\n", ValueCell->Id, REG_VALUE_CELL_ID); - assert(ValueCell->Id == REG_VALUE_CELL_ID); + ASSERT(ValueCell->Id == REG_VALUE_CELL_ID); } //ValueCell->NameSize; @@ -245,7 +245,7 @@ CmiVerifyValueListCell(PVALUE_LIST_CELL ValueListCell) { DbgPrint("CellSize is %d (must not be 0)\n", ValueListCell->CellSize); - assert(ValueListCell->CellSize != 0); + ASSERT(ValueListCell->CellSize != 0); } } @@ -262,21 +262,21 @@ CmiVerifyKeyObject(PKEY_OBJECT KeyObject) { DbgPrint("RegistryHive is NULL (must not be NULL)\n", KeyObject->RegistryHive); - assert(KeyObject->RegistryHive != NULL); + ASSERT(KeyObject->RegistryHive != NULL); } if (KeyObject->KeyCell == NULL) { DbgPrint("KeyCell is NULL (must not be NULL)\n", KeyObject->KeyCell); - assert(KeyObject->KeyCell != NULL); + ASSERT(KeyObject->KeyCell != NULL); } if (KeyObject->ParentKey == NULL) { DbgPrint("ParentKey is NULL (must not be NULL)\n", KeyObject->ParentKey); - assert(KeyObject->ParentKey != NULL); + ASSERT(KeyObject->ParentKey != NULL); } } @@ -294,42 +294,42 @@ CmiVerifyHiveHeader(PHIVE_HEADER Header) DbgPrint("BlockId is %.08x (must be %.08x)\n", Header->BlockId, REG_HIVE_ID); - assert(Header->BlockId == REG_HIVE_ID); + ASSERT(Header->BlockId == REG_HIVE_ID); } if (Header->Unused3 != 1) { DbgPrint("Unused3 is %.08x (must be 1)\n", Header->Unused3); - assert(Header->Unused3 == 1); + ASSERT(Header->Unused3 == 1); } if (Header->Unused4 != 3) { DbgPrint("Unused4 is %.08x (must be 3)\n", Header->Unused4); - assert(Header->Unused4 == 3); + ASSERT(Header->Unused4 == 3); } if (Header->Unused5 != 0) { DbgPrint("Unused5 is %.08x (must be 0)\n", Header->Unused5); - assert(Header->Unused5 == 0); + ASSERT(Header->Unused5 == 0); } if (Header->Unused6 != 1) { DbgPrint("Unused6 is %.08x (must be 1)\n", Header->Unused6); - assert(Header->Unused6 == 1); + ASSERT(Header->Unused6 == 1); } if (Header->Unused7 != 1) { DbgPrint("Unused7 is %.08x (must be 1)\n", Header->Unused7); - assert(Header->Unused7 == 1); + ASSERT(Header->Unused7 == 1); } } @@ -396,7 +396,7 @@ CmiCreateNewRegFile(HANDLE FileHandle) ExFreePool(Buffer); - assertmsg(NT_SUCCESS(Status), ("Status: 0x%X\n", Status)); + ASSERTMSG(NT_SUCCESS(Status), ("Status: 0x%X\n", Status)); if (!NT_SUCCESS(Status)) { @@ -686,7 +686,7 @@ CmiImportHiveBins(PREGISTRY_HIVE Hive, return STATUS_REGISTRY_CORRUPT; } - assertmsg((Bin->BinSize % REG_BLOCK_SIZE) == 0, + ASSERTMSG((Bin->BinSize % REG_BLOCK_SIZE) == 0, ("Bin size (0x%.08x) must be multiple of 4K\n", Bin->BinSize)); @@ -2319,7 +2319,7 @@ CmiScanForSubKey(IN PREGISTRY_HIVE RegistryHive, DPRINT("Scanning for sub key %wZ\n", KeyName); - assert(RegistryHive); + ASSERT(RegistryHive); *SubKeyCell = NULL; @@ -3062,7 +3062,7 @@ CmiAllocateHashTableCell (IN PREGISTRY_HIVE RegistryHive, } else { - assert(SubKeyCount <= 0xffff); /* should really be USHORT_MAX or similar */ + ASSERT(SubKeyCount <= 0xffff); /* should really be USHORT_MAX or similar */ NewHashBlock->Id = REG_HASH_TABLE_CELL_ID; NewHashBlock->HashTableSize = (USHORT)SubKeyCount; *HashBlock = NewHashBlock; @@ -3177,7 +3177,7 @@ CmiAllocateValueCell(PREGISTRY_HIVE RegistryHive, } else { - assert(NameSize <= 0xffff); /* should really be USHORT_MAX or similar */ + ASSERT(NameSize <= 0xffff); /* should really be USHORT_MAX or similar */ NewValueCell->Id = REG_VALUE_CELL_ID; NewValueCell->NameSize = (USHORT)NameSize; if (Packable) @@ -3661,8 +3661,8 @@ CmiAddFree(PREGISTRY_HIVE RegistryHive, LONG maxInd; LONG medInd; - assert(RegistryHive); - assert(FreeBlock); + ASSERT(RegistryHive); + ASSERT(FreeBlock); DPRINT("FreeBlock %.08lx FreeOffset %.08lx\n", FreeBlock, FreeOffset); diff --git a/reactos/ntoskrnl/cm/registry.c b/reactos/ntoskrnl/cm/registry.c index eef32478e07..26b3a80625b 100644 --- a/reactos/ntoskrnl/cm/registry.c +++ b/reactos/ntoskrnl/cm/registry.c @@ -1,4 +1,4 @@ -/* $Id: registry.c,v 1.126 2004/09/13 11:46:07 ekohl Exp $ +/* $Id: registry.c,v 1.127 2004/10/22 20:14:04 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -114,7 +114,7 @@ CmiCheckSubKeys(BOOLEAN Verbose, KEY_ALL_ACCESS, &ObjectAttributes); - assert(NT_SUCCESS(Status)); + ASSERT(NT_SUCCESS(Status)); CmiCheckKey(Verbose, SubKey); @@ -123,7 +123,7 @@ CmiCheckSubKeys(BOOLEAN Verbose, Index++; } - assert(NT_SUCCESS(Status)); + ASSERT(NT_SUCCESS(Status)); } @@ -174,7 +174,7 @@ CmiCheckValues(BOOLEAN Verbose, Index++; } - assert(NT_SUCCESS(Status)); + ASSERT(NT_SUCCESS(Status)); } @@ -218,7 +218,7 @@ CmiCheckByName(BOOLEAN Verbose, { DbgPrint("KeyPath %wZ Status: %.08x", KeyPath, Status); DbgPrint("KeyPath %S Status: %.08x", KeyPath.Buffer, Status); - assert(NT_SUCCESS(Status)); + ASSERT(NT_SUCCESS(Status)); } } @@ -254,7 +254,7 @@ CmInitializeRegistry(VOID) /* Initialize the Key object type */ CmiKeyType = ExAllocatePool(NonPagedPool, sizeof(OBJECT_TYPE)); - assert(CmiKeyType); + ASSERT(CmiKeyType); CmiKeyType->Tag = TAG('R', 'e', 'g', 'K'); CmiKeyType->TotalObjects = 0; CmiKeyType->TotalHandles = 0; @@ -283,7 +283,7 @@ CmInitializeRegistry(VOID) /* Build volatile registry store */ Status = CmiCreateVolatileHive (&CmiVolatileHive); - assert(NT_SUCCESS(Status)); + ASSERT(NT_SUCCESS(Status)); /* Create '\Registry' key. */ RtlInitUnicodeString(&KeyName, REG_ROOT_KEY_NAME); @@ -297,14 +297,14 @@ CmInitializeRegistry(VOID) 0, 0, (PVOID *) &RootKey); - assert(NT_SUCCESS(Status)); + ASSERT(NT_SUCCESS(Status)); Status = ObInsertObject(RootKey, NULL, STANDARD_RIGHTS_REQUIRED, 0, NULL, &RootKeyHandle); - assert(NT_SUCCESS(Status)); + ASSERT(NT_SUCCESS(Status)); RootKey->RegistryHive = CmiVolatileHive; RootKey->KeyCellOffset = CmiVolatileHive->HiveHeader->RootKeyOffset; RootKey->KeyCell = CmiGetCell (CmiVolatileHive, RootKey->KeyCellOffset, NULL); @@ -314,14 +314,14 @@ CmInitializeRegistry(VOID) RootKey->SubKeys = NULL; RootKey->SizeOfSubKeys = 0; Status = RtlCreateUnicodeString(&RootKey->Name, L"Registry"); - assert(NT_SUCCESS(Status)); + ASSERT(NT_SUCCESS(Status)); #if 0 Status = CmiAllocateCell(CmiVolatileHive, 0x10, //LONG CellSize, (PVOID *)&RootSecurityCell, &RootKey->KeyCell->SecurityKeyOffset); - assert(NT_SUCCESS(Status)); + ASSERT(NT_SUCCESS(Status)); /* Copy the security descriptor */ @@ -345,7 +345,7 @@ CmInitializeRegistry(VOID) NULL, REG_OPTION_VOLATILE, NULL); - assert(NT_SUCCESS(Status)); + ASSERT(NT_SUCCESS(Status)); /* Create '\Registry\User' key. */ RtlInitUnicodeString(&KeyName, @@ -362,7 +362,7 @@ CmInitializeRegistry(VOID) NULL, REG_OPTION_VOLATILE, NULL); - assert(NT_SUCCESS(Status)); + ASSERT(NT_SUCCESS(Status)); } @@ -1183,12 +1183,7 @@ CmiSyncHives(VOID) CmiHiveSyncPending = TRUE; - -#if defined(__GNUC__) - Timeout.QuadPart = -50000000LL; -#else - Timeout.QuadPart = -50000000; -#endif + Timeout.QuadPart = (LONGLONG)-50000000; KeSetTimer(&CmiHiveSyncTimer, Timeout, &CmiHiveSyncDpc); diff --git a/reactos/ntoskrnl/dbg/kdb_stabs.c b/reactos/ntoskrnl/dbg/kdb_stabs.c index c8a918e8fd5..db0930d4ade 100644 --- a/reactos/ntoskrnl/dbg/kdb_stabs.c +++ b/reactos/ntoskrnl/dbg/kdb_stabs.c @@ -73,7 +73,7 @@ KdbpStabFindEntry(IN PIMAGE_SYMBOL_INFO SymbolInfo, StabsEnd = (PVOID)((ULONG_PTR)SymbolInfo->SymbolsBase + SymbolInfo->SymbolsLength); if (StartEntry != NULL) { - assert((ULONG_PTR)StartEntry >= (ULONG_PTR)StabEntry); + ASSERT((ULONG_PTR)StartEntry >= (ULONG_PTR)StabEntry); if ((ULONG_PTR)StartEntry >= (ULONG_PTR)StabsEnd) return NULL; StabEntry = StartEntry; diff --git a/reactos/ntoskrnl/dbg/kdb_symbols.c b/reactos/ntoskrnl/dbg/kdb_symbols.c index e1ac54a8330..517ea267bee 100644 --- a/reactos/ntoskrnl/dbg/kdb_symbols.c +++ b/reactos/ntoskrnl/dbg/kdb_symbols.c @@ -325,7 +325,7 @@ KdbSymGetAddressInformation(IN PIMAGE_SYMBOL_INFO SymbolInfo, } #endif - assert(LineNumber || FileName || FunctionName); + ASSERT(LineNumber || FileName || FunctionName); if (LineNumber != NULL || FunctionName != NULL) { @@ -580,12 +580,12 @@ KdbpSymAddCachedFile(IN PUNICODE_STRING FileName, /* allocate entry */ CacheEntry = ExAllocatePool(NonPagedPool, sizeof (IMAGE_SYMBOL_INFO_CACHE)); - assert(CacheEntry); + ASSERT(CacheEntry); RtlZeroMemory(CacheEntry, sizeof (IMAGE_SYMBOL_INFO_CACHE)); /* fill entry */ RtlCreateUnicodeString(&CacheEntry->FileName, FileName->Buffer); - assert(CacheEntry->FileName.Buffer); + ASSERT(CacheEntry->FileName.Buffer); CacheEntry->RefCount = 1; CacheEntry->FileBuffer = SymbolInfo->FileBuffer; CacheEntry->SymbolsBase = SymbolInfo->SymbolsBase; @@ -621,7 +621,7 @@ KdbpSymRemoveCachedFile(IN PIMAGE_SYMBOL_INFO SymbolInfo) if (Current->FileBuffer == SymbolInfo->FileBuffer) /* found */ { - assert(Current->RefCount > 0); + ASSERT(Current->RefCount > 0); Current->RefCount--; if (Current->RefCount < 1) { @@ -639,7 +639,7 @@ KdbpSymRemoveCachedFile(IN PIMAGE_SYMBOL_INFO SymbolInfo) KeReleaseSpinLock(&SymbolFileListLock, Irql); DPRINT1("Warning: Removing unknown symbol file: FileBuffer = %p, ImageBase = %p\n", SymbolInfo->FileBuffer, SymbolInfo->ImageBase); - assert(0); + ASSERT(0); } /*! \brief Loads a symbol file. @@ -840,8 +840,8 @@ KdbSymFreeProcessSymbols(IN PEPROCESS Process) KeAttachProcess(Process); } Peb = Process->Peb; - assert (Peb); - assert (Peb->Ldr); + ASSERT(Peb); + ASSERT(Peb->Ldr); CurrentEntry = Peb->Ldr->InLoadOrderModuleList.Flink; while (CurrentEntry != &Peb->Ldr->InLoadOrderModuleList && diff --git a/reactos/ntoskrnl/dbg/profile.c b/reactos/ntoskrnl/dbg/profile.c index f432d38cc1a..240acc40e04 100755 --- a/reactos/ntoskrnl/dbg/profile.c +++ b/reactos/ntoskrnl/dbg/profile.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: profile.c,v 1.9 2004/08/26 16:04:49 blight Exp $ +/* $Id: profile.c,v 1.10 2004/10/22 20:16:47 ekohl Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/dbg/profile.c @@ -100,7 +100,7 @@ KdbAddEntryToProfileDatabase(PPROFILE_DATABASE ProfileDatabase, ULONG_PTR Addres if (IsListEmpty(&ProfileDatabase->ListHead)) { block = ExAllocatePool(NonPagedPool, sizeof(PROFILE_DATABASE_BLOCK)); - assert(block); + ASSERT(block); block->UsedEntries = 0; InsertTailList(&ProfileDatabase->ListHead, &block->ListEntry); block->Entries[block->UsedEntries++].Address = Address; @@ -111,7 +111,7 @@ KdbAddEntryToProfileDatabase(PPROFILE_DATABASE ProfileDatabase, ULONG_PTR Addres if (block->UsedEntries >= PDE_BLOCK_ENTRIES) { block = ExAllocatePool(NonPagedPool, sizeof(PROFILE_DATABASE_BLOCK)); - assert(block); + ASSERT(block); block->UsedEntries = 0; InsertTailList(&ProfileDatabase->ListHead, &block->ListEntry); } @@ -335,7 +335,7 @@ KdbProfilerAnalyzeSamples() if (!ExSearchHashTable(&Hashtable, (PVOID) NameBuffer, KeyLength, (PVOID *) &sgi)) { sgi = ExAllocatePool(NonPagedPool, sizeof(SAMPLE_GROUP_INFO)); - assert(sgi); + ASSERT(sgi); sgi->Address = Address; sgi->Count = 1; strcpy(sgi->Description, NameBuffer); @@ -464,7 +464,7 @@ KdbEnableProfiling() KeInitializeMutex(&KdbProfilerLock, 0); KdbProfileDatabase = ExAllocatePool(NonPagedPool, sizeof(PROFILE_DATABASE)); - assert(KdbProfileDatabase); + ASSERT(KdbProfileDatabase); InitializeListHead(&KdbProfileDatabase->ListHead); KeInitializeDpc(&KdbProfilerCollectorDpc, KdbProfilerCollectorDpcRoutine, NULL); @@ -484,7 +484,7 @@ KdbEnableProfiling() VOID KdbProfileInterrupt(ULONG_PTR Address) { - assert(KeGetCurrentIrql() == PROFILE_LEVEL); + ASSERT(KeGetCurrentIrql() == PROFILE_LEVEL); if (KdbProfilingInitialized != TRUE) { diff --git a/reactos/ntoskrnl/dbg/rdebug.c b/reactos/ntoskrnl/dbg/rdebug.c index 51375415d4f..d5182d0c9db 100644 --- a/reactos/ntoskrnl/dbg/rdebug.c +++ b/reactos/ntoskrnl/dbg/rdebug.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: rdebug.c,v 1.6 2004/08/15 16:39:00 chorns Exp $ +/* $Id: rdebug.c,v 1.7 2004/10/22 20:16:48 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -119,7 +119,7 @@ DbgEnableFile(PCH Filename) if (!DbgpFind(Filename)) { Entry = ExAllocatePool(NonPagedPool, sizeof(RDEBUG_ENTRY)); - assert(Entry); + ASSERT(Entry); RtlMoveMemory(Entry->Filename, Filename, strlen(Filename) + 1); InsertTailList(&RDebugListHead, &Entry->ListEntry); } diff --git a/reactos/ntoskrnl/ex/btree.c b/reactos/ntoskrnl/ex/btree.c index 301412467e7..d626809470e 100644 --- a/reactos/ntoskrnl/ex/btree.c +++ b/reactos/ntoskrnl/ex/btree.c @@ -264,7 +264,7 @@ VOID ExpRemoveAboveExternalBinaryTreeNode(PBINARY_TREE Tree, PBINARY_TREE_NODE Node) { - assertmsg(ExpBinaryTreeIsExternalNode(Node), ("Node is not external")); + ASSERTMSG(ExpBinaryTreeIsExternalNode(Node), ("Node is not external")); if (Node == ExpBinaryTreeRootNode(Tree)) { diff --git a/reactos/ntoskrnl/ex/fmutex.c b/reactos/ntoskrnl/ex/fmutex.c index c335fd42a02..8091d382a30 100644 --- a/reactos/ntoskrnl/ex/fmutex.c +++ b/reactos/ntoskrnl/ex/fmutex.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: fmutex.c,v 1.21 2004/08/15 16:39:01 chorns Exp $ +/* $Id: fmutex.c,v 1.22 2004/10/22 20:18:35 ekohl Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/ex/fmutex.c @@ -40,15 +40,15 @@ VOID FASTCALL ExAcquireFastMutexUnsafe(PFAST_MUTEX FastMutex) { - assert(FastMutex->Owner != KeGetCurrentThread()); + ASSERT(FastMutex->Owner != KeGetCurrentThread()); InterlockedIncrement((LONG *)&FastMutex->Contention); while (InterlockedExchange(&FastMutex->Count, 0) == 0) - { + { KeWaitForSingleObject(&FastMutex->Event, Executive, KernelMode, FALSE, - NULL); + NULL); } InterlockedDecrement((LONG *)&FastMutex->Contention); FastMutex->Owner = KeGetCurrentThread(); @@ -60,7 +60,7 @@ ExAcquireFastMutexUnsafe(PFAST_MUTEX FastMutex) VOID FASTCALL ExReleaseFastMutexUnsafe(PFAST_MUTEX FastMutex) { - assert(FastMutex->Owner == KeGetCurrentThread()); + ASSERT(FastMutex->Owner == KeGetCurrentThread()); FastMutex->Owner = NULL; InterlockedExchange(&FastMutex->Count, 1); if (FastMutex->Contention > 0) diff --git a/reactos/ntoskrnl/ex/resource.c b/reactos/ntoskrnl/ex/resource.c index 6a3484483ad..4c06bc2e247 100644 --- a/reactos/ntoskrnl/ex/resource.c +++ b/reactos/ntoskrnl/ex/resource.c @@ -1,4 +1,4 @@ -/* $Id: resource.c,v 1.28 2004/08/15 16:39:01 chorns Exp $ +/* $Id: resource.c,v 1.29 2004/10/22 20:18:35 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -826,7 +826,7 @@ ExReleaseResourceForThreadLite ( Resource->OwnerThreads[0].OwnerThread = 0; Resource->ActiveCount--; Resource->Flag &=(~ResourceOwnedExclusive); - assert(Resource->ActiveCount == 0); + ASSERT(Resource->ActiveCount == 0); DPRINT("Resource->NumberOfExclusiveWaiters %d\n", Resource->NumberOfExclusiveWaiters); if (Resource->NumberOfExclusiveWaiters) diff --git a/reactos/ntoskrnl/ex/work.c b/reactos/ntoskrnl/ex/work.c index f1729634bdf..b048ca46e2d 100644 --- a/reactos/ntoskrnl/ex/work.c +++ b/reactos/ntoskrnl/ex/work.c @@ -1,4 +1,4 @@ -/* $Id: work.c,v 1.19 2004/08/15 16:39:01 chorns Exp $ +/* $Id: work.c,v 1.20 2004/10/22 20:18:37 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -151,7 +151,7 @@ ExQueueWorkItem (PWORK_QUEUE_ITEM WorkItem, * QueueType = Queue to insert it in */ { - assert(WorkItem!=NULL); + ASSERT(WorkItem!=NULL); ASSERT_IRQL(DISPATCH_LEVEL); /* diff --git a/reactos/ntoskrnl/fs/filelock.c b/reactos/ntoskrnl/fs/filelock.c index c780a06eabf..0a0f902c798 100644 --- a/reactos/ntoskrnl/fs/filelock.c +++ b/reactos/ntoskrnl/fs/filelock.c @@ -1,4 +1,4 @@ -/* $Id: filelock.c,v 1.14 2004/08/15 16:39:01 chorns Exp $ +/* $Id: filelock.c,v 1.15 2004/10/22 20:19:58 ekohl Exp $ * * reactos/ntoskrnl/fs/filelock.c * @@ -125,7 +125,7 @@ FsRtlpCheckLockForReadOrWriteAccess( PFILE_LOCK_GRANTED Granted; PLIST_ENTRY EnumEntry; - assert(FileLock); + ASSERT(FileLock); LockToc = FileLock->LockInformation; if (LockToc == NULL || Length->QuadPart == 0) @@ -327,7 +327,7 @@ FsRtlpFastUnlockAllByKey( //must make local copy since FILE_LOCK struct is allowed to be paged PUNLOCK_ROUTINE GotUnlockRoutine; - assert(FileLock); + ASSERT(FileLock); LockToc = FileLock->LockInformation; if (LockToc == NULL) @@ -629,7 +629,7 @@ FsRtlpUnlockSingle( PFILE_LOCK_GRANTED Granted; PLIST_ENTRY EnumEntry; - assert(FileLock); + ASSERT(FileLock); LockToc = FileLock->LockInformation; if (LockToc == NULL || Length->QuadPart == 0) @@ -734,7 +734,7 @@ FsRtlpDumpFileLocks( PLIST_ENTRY EnumEntry; PEXTENDED_IO_STACK_LOCATION Stack; - assert(FileLock); + ASSERT(FileLock); LockToc = FileLock->LockInformation; if (LockToc == NULL) @@ -823,7 +823,7 @@ FsRtlGetNextFileLock ( FILE_LOCK_INFO LocalLastReturnedLockInfo; PVOID LocalLastReturnedLock; - assert(FileLock); + ASSERT(FileLock); LockToc = FileLock->LockInformation; if (LockToc == NULL) { @@ -946,7 +946,7 @@ FsRtlPrivateLock ( PFILE_LOCK_TOC LockToc; KIRQL oldirql; - assert(FileLock); + ASSERT(FileLock); if (FileLock->LockInformation == NULL) { ExAcquireFastMutex(&LockTocMutex); @@ -1021,7 +1021,7 @@ FsRtlPrivateLock ( KeReleaseSpinLock(&LockToc->SpinLock, oldirql); //fires cancel routine //never pending if no irp;-) - assert(!(IoStatus->Status == STATUS_PENDING && !Irp)); + ASSERT(!(IoStatus->Status == STATUS_PENDING && !Irp)); if (IoStatus->Status != STATUS_PENDING) { @@ -1085,7 +1085,7 @@ FsRtlProcessFileLock ( NTSTATUS Status; IO_STATUS_BLOCK LocalIoStatus; - assert(FileLock); + ASSERT(FileLock); Stack = (PEXTENDED_IO_STACK_LOCATION) IoGetCurrentIrpStackLocation(Irp); Irp->IoStatus.Information = 0; @@ -1174,7 +1174,7 @@ FsRtlUninitializeFileLock ( PLIST_ENTRY EnumEntry; KIRQL oldirql; - assert(FileLock); + ASSERT(FileLock); if (FileLock->LockInformation == NULL) { return; @@ -1281,7 +1281,7 @@ FsRtlFreeFileLock( IN PFILE_LOCK FileLock ) { - assert(FileLock); + ASSERT(FileLock); FsRtlUninitializeFileLock(FileLock); ExFreeToPagedLookasideList(&LockLookaside, FileLock);