Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 20 of file wait.c.
{ PLIST_ENTRY WaitEntry, WaitList; PKWAIT_BLOCK WaitBlock; PKTHREAD WaitThread; PKMUTANT FirstObject = ObjectPointer; NTSTATUS WaitStatus; /* Loop the Wait Entries */ WaitList = &FirstObject->Header.WaitListHead; WaitEntry = WaitList->Flink; while ((FirstObject->Header.SignalState > 0) && (WaitEntry != WaitList)) { /* Get the current wait block */ WaitBlock = CONTAINING_RECORD(WaitEntry, KWAIT_BLOCK, WaitListEntry); WaitThread = WaitBlock->Thread; WaitStatus = STATUS_KERNEL_APC; /* Check the current Wait Mode */ if (WaitBlock->WaitType == WaitAny) { /* Easy case, satisfy only this wait */ WaitStatus = (NTSTATUS)WaitBlock->WaitKey; KiSatisfyObjectWait(FirstObject, WaitThread); } /* Now do the rest of the unwait */ KiUnwaitThread(WaitThread, WaitStatus, Increment); WaitEntry = WaitList->Flink; } }