Lines Matching defs:context

4713 	Returns \c B_OK with \c context.restart set to \c true, if the functions
4716 Returns \c B_OK with \c context.restart set to \c false, if the page was
4717 found. It is returned in \c context.page. The address space will still be
4722 fault_get_page(PageFaultContext& context)
4724 VMCache* cache = context.topCache;
4733 page = cache->LookupPage(context.cacheOffset);
4736 context.UnlockAll(cache);
4741 context.restart = true;
4751 if (cache->HasPage(context.cacheOffset)) {
4753 page = vm_page_allocate_page(&context.reservation,
4755 cache->InsertPage(page, context.cacheOffset);
4760 context.UnlockAll();
4767 status_t status = cache->Read(context.cacheOffset, &vec, 1,
4794 context.restart = true;
4798 cache = context.cacheChainLocker.LockSourceCache();
4805 cache = context.isWrite ? context.topCache : lastCache;
4808 page = vm_page_allocate_page(&context.reservation,
4814 cache->InsertPage(page, context.cacheOffset);
4815 context.pageAllocated = true;
4816 } else if (page->Cache() != context.topCache && context.isWrite) {
4824 page = vm_page_allocate_page(&context.reservation, PAGE_STATE_ACTIVE);
4830 context.cacheChainLocker.UnlockKeepRefs(true);
4836 context.cacheChainLocker.RelockCaches(true);
4840 context.topCache->InsertPage(page, context.cacheOffset);
4841 context.pageAllocated = true;
4845 context.page = page;
4869 PageFaultContext context(addressSpace, isWrite);
4879 size_t reservePages = 2 + context.map->MaxPagesNeededToMap(originalAddress,
4881 context.addressSpaceLocker.Unlock();
4882 vm_page_reserve_pages(&context.reservation, reservePages,
4887 context.addressSpaceLocker.Lock();
4941 context.Prepare(vm_area_get_locked_cache(area),
4950 status = context.topCache->Fault(addressSpace, context.cacheOffset);
4958 status = fault_get_page(context);
4964 if (context.restart)
4969 TPF(PageFaultDone(area->id, context.topCache, context.page->Cache(),
4970 context.page));
4976 if (context.page->Cache() != context.topCache && !isWrite)
4983 context.map->Lock();
4988 if (context.map->Query(address, &physicalAddress, &flags) == B_OK
4994 if (mappedPage == context.page) {
4995 context.map->ProtectPage(area, address, newProtection);
5004 context.map->Unlock();
5017 if (context.pageAllocated) {
5022 context.topCache->RemovePage(context.page);
5023 vm_page_free_etc(context.topCache, context.page,
5024 &context.reservation);
5026 DEBUG_PAGE_ACCESS_END(context.page);
5028 context.UnlockAll();
5048 if (map_page(area, context.page, address, newProtection,
5049 &context.reservation) != B_OK) {
5056 DEBUG_PAGE_ACCESS_END(context.page);
5058 context.UnlockAll();
5074 } else if (context.page->State() == PAGE_STATE_INACTIVE)
5075 vm_page_set_state(context.page, PAGE_STATE_ACTIVE);
5079 increment_page_wired_count(context.page);
5080 *wirePage = context.page;
5083 DEBUG_PAGE_ACCESS_END(context.page);