// FIXME: Check! What to do?
if (RequestSize == 0) DPRINT1("Requesting UMA descriptor with null size?!\n");
- for (Entry = UmaDescriptorList.Flink;
- Entry != &UmaDescriptorList;
- Entry = Entry->Flink)
+ Entry = UmaDescriptorList.Flink;
+ while (Entry != &UmaDescriptorList)
{
UmaDesc = (PUMA_DESCRIPTOR)CONTAINING_RECORD(Entry, UMA_DESCRIPTOR, Entry);
+ Entry = Entry->Flink;
/* Only check free descriptors */
if (UmaDesc->Type != UMA_FREE) continue;
PUMA_DESCRIPTOR UmaDesc, PrevDesc = NULL, NextDesc = NULL;
PUMA_DESCRIPTOR FoundUmaDesc = NULL;
- for (Entry = UmaDescriptorList.Flink;
- Entry != &UmaDescriptorList;
- Entry = Entry->Flink)
+ Entry = UmaDescriptorList.Flink;
+ while (Entry != &UmaDescriptorList)
{
UmaDesc = (PUMA_DESCRIPTOR)CONTAINING_RECORD(Entry, UMA_DESCRIPTOR, Entry);
+ Entry = Entry->Flink;
/* Search for the descriptor in the list */
if (UmaDesc->Start == Address && UmaDesc->Type == UMA_UMB)
// FIXME: Check! What to do?
if (RequestSize == 0) DPRINT1("Resizing UMA descriptor %04X to null size?!\n", Segment);
- for (Entry = UmaDescriptorList.Flink;
- Entry != &UmaDescriptorList;
- Entry = Entry->Flink)
+ Entry = UmaDescriptorList.Flink;
+ while (Entry != &UmaDescriptorList)
{
UmaDesc = (PUMA_DESCRIPTOR)CONTAINING_RECORD(Entry, UMA_DESCRIPTOR, Entry);
+ Entry = Entry->Flink;
/* Only get the maximum size of free descriptors */
if (UmaDesc->Type == UMA_FREE)
extern BOOLEAN CpuRunning;
UINT i;
PLIST_ENTRY Entry;
+ PHARDWARE_TIMER Timer;
while (VdmRunning && CpuRunning)
{
++Cycles;
}
- for (Entry = Timers.Flink; Entry != &Timers; Entry = Entry->Flink)
+ Entry = Timers.Flink;
+ while (Entry != &Timers)
{
ULONGLONG Ticks = (ULONGLONG)-1;
- PHARDWARE_TIMER Timer = CONTAINING_RECORD(Entry, HARDWARE_TIMER, Link);
+
+ Timer = CONTAINING_RECORD(Entry, HARDWARE_TIMER, Link);
+ Entry = Entry->Flink;
ASSERT((Timer->EnableCount > 0) && (Timer->Flags & HARDWARE_TIMER_ENABLED));
{
PHARDWARE_TIMER Timer;
- Timer = RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof(*Timer));
+ Timer = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*Timer));
if (Timer == NULL) return NULL;
Timer->Flags = Flags & ~HARDWARE_TIMER_ENABLED;
Timer->EnableCount = 0;
Timer->Callback = Callback;
+ Timer->LastTick.QuadPart = 0;
SetHardwareTimerDelay(Timer, Delay);
if (Flags & HARDWARE_TIMER_ENABLED) EnableHardwareTimer(Timer);