From a2ff38d818f368390315cd6952f83a45efe71cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 8 Oct 2004 22:54:42 +0000 Subject: [PATCH] vm_page no longer keeps a pointer to the vm_cache_ref but to the vm_cache. This cleans the page handling when having to make an area copy-on-write; regions belong to vm_cache_ref, pages to vm_cache. Added prototype for new call vm_copy_area(). Fixed some return types. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9263 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/kernel/vm.h | 10 ++++++---- headers/private/kernel/vm_types.h | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/headers/private/kernel/vm.h b/headers/private/kernel/vm.h index e52d7c53bd..9d9d963e99 100755 --- a/headers/private/kernel/vm.h +++ b/headers/private/kernel/vm.h @@ -53,15 +53,17 @@ region_id vm_map_physical_memory(aspace_id aid, const char *name, void **address region_id vm_map_file(aspace_id aid, char *name, void **address, int addr_type, addr size, int lock, int mapping, const char *path, off_t offset); region_id vm_create_null_region(aspace_id aid, char *name, void **address, int addr_type, addr size); +area_id vm_copy_area(aspace_id addressSpaceID, const char *name, void **_address, uint32 addressSpec, + uint32 protection, area_id sourceID); region_id vm_clone_region(aspace_id aid, char *name, void **address, int addr_type, region_id source_region, int mapping, int lock); -int vm_delete_region(aspace_id aid, region_id id); +status_t vm_delete_region(aspace_id aid, region_id id); region_id vm_find_region_by_name(aspace_id aid, const char *name); status_t vm_create_vnode_cache(void *vnode, void **_cache); -int vm_get_page_mapping(aspace_id aid, addr vaddr, addr *paddr); -int vm_get_physical_page(addr paddr, addr *vaddr, int flags); -int vm_put_physical_page(addr vaddr); +status_t vm_get_page_mapping(aspace_id aid, addr vaddr, addr *paddr); +status_t vm_get_physical_page(addr paddr, addr *vaddr, int flags); +status_t vm_put_physical_page(addr vaddr); area_id _user_create_area(const char *name, void **address, uint32 addressSpec, size_t size, uint32 lock, uint32 protection); diff --git a/headers/private/kernel/vm_types.h b/headers/private/kernel/vm_types.h index 4ca7ef3099..91bbe56187 100644 --- a/headers/private/kernel/vm_types.h +++ b/headers/private/kernel/vm_types.h @@ -20,7 +20,7 @@ typedef struct vm_page { addr_t ppn; // physical page number off_t offset; - struct vm_cache_ref *cache_ref; + struct vm_cache *cache; struct vm_page *cache_prev; struct vm_page *cache_next;