firemili.blogg.se

Keacquirespinlock reactos
Keacquirespinlock reactos





keacquirespinlock reactos

Return(STATUS_MM_RESTART_OPERATION) // 返回上层MmNotPresentFault中重新循环运行到此: case MEMORY_AREA_SECTION_VIEW: MmspCompleteAndReleasePageOp(PageOp) // 则设置事件释放PAGEOP(减少引用计数) * If this wasn't a pagein then restart the operation Status = MmspWaitForPageOpCompletionEvent(PageOp) // 看上面注释,有多个线程等待PAGEOUT完成 /*ĭPRINT1("Failed to wait for page op, status = %x\n", Status) ĭPRINT1("Woke for page op before completion\n") If (PageOp->Thread != PsGetCurrentThread()) * Check if someone else is already handling this fault, if so wait * Get or create a page operation descriptor Region->Protect = PAGE_EXECUTE_READWRITE))Īttributes = Region->Protect = PAGE_READWRITE ? PAGE_READONLY : PAGE_EXECUTE_READ If ((Segment->WriteCopy || MemoryArea->) & * Check if this page needs to be mapped COW Region = MmFindRegion(MemoryArea->StartingAddress, Offset = (ULONG_PTR)PAddress - (ULONG_PTR)MemoryArea->StartingAddress PAddress = MM_ROUND_DOWN(Address, PAGE_SIZE) MmLockPage(MmGetPfnForProcess(AddressSpace->Process, Address)) If (MmIsPagePresent(AddressSpace->Process, Address)) * address space when another thread could load the page so we check * There is a window between taking the page fault and locking the MmNotPresentFaultSectionView(PMADDRESS_SPACE AddressSpace,







Keacquirespinlock reactos