[haiku-commits] r34422 - in haiku/trunk: headers/private/kernel headers/private/kernel/arch src/system/kernel src/system/kernel/arch/arm src/system/kernel/arch/m68k ...

  • From: ingo_weinhold@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 1 Dec 2009 18:27:10 +0100 (CET)

Author: bonefish
Date: 2009-12-01 18:27:09 +0100 (Tue, 01 Dec 2009)
New Revision: 34422
Changeset: http://dev.haiku-os.org/changeset/34422/haiku

Modified:
   haiku/trunk/headers/private/kernel/arch/vm.h
   haiku/trunk/headers/private/kernel/team.h
   haiku/trunk/headers/private/kernel/thread_types.h
   haiku/trunk/headers/private/kernel/vm.h
   haiku/trunk/headers/private/kernel/vm_address_space.h
   haiku/trunk/headers/private/kernel/vm_types.h
   haiku/trunk/src/system/kernel/arch/arm/arch_vm.cpp
   haiku/trunk/src/system/kernel/arch/m68k/arch_vm.cpp
   haiku/trunk/src/system/kernel/arch/mipsel/arch_vm.cpp
   haiku/trunk/src/system/kernel/arch/ppc/arch_vm.cpp
   haiku/trunk/src/system/kernel/arch/ppc/arch_vm_translation_map.cpp
   haiku/trunk/src/system/kernel/arch/x86/arch_thread.cpp
   haiku/trunk/src/system/kernel/arch/x86/arch_vm.cpp
   haiku/trunk/src/system/kernel/cache/vnode_store.cpp
   haiku/trunk/src/system/kernel/cache/vnode_store.h
   haiku/trunk/src/system/kernel/team.cpp
   haiku/trunk/src/system/kernel/vm/VMAnonymousCache.cpp
   haiku/trunk/src/system/kernel/vm/VMAnonymousCache.h
   haiku/trunk/src/system/kernel/vm/VMAnonymousNoSwapCache.cpp
   haiku/trunk/src/system/kernel/vm/VMAnonymousNoSwapCache.h
   haiku/trunk/src/system/kernel/vm/vm.cpp
   haiku/trunk/src/system/kernel/vm/vm_address_space.cpp
   haiku/trunk/src/system/kernel/vm/vm_cache.cpp
   haiku/trunk/src/system/kernel/vm/vm_page.cpp
Log:
Renamed vm_address_space to VMAddressSpace.


Modified: haiku/trunk/headers/private/kernel/arch/vm.h
===================================================================
--- haiku/trunk/headers/private/kernel/arch/vm.h        2009-12-01 17:26:22 UTC 
(rev 34421)
+++ haiku/trunk/headers/private/kernel/arch/vm.h        2009-12-01 17:27:09 UTC 
(rev 34422)
@@ -16,7 +16,7 @@
 
 struct kernel_args;
 struct vm_area;
-struct vm_address_space;
+struct VMAddressSpace;
 
 
 #ifdef __cplusplus
@@ -27,8 +27,8 @@
 status_t arch_vm_init_post_area(struct kernel_args *args);
 status_t arch_vm_init_end(struct kernel_args *args);
 status_t arch_vm_init_post_modules(struct kernel_args *args);
-void arch_vm_aspace_swap(struct vm_address_space *from,
-       struct vm_address_space *to);
+void arch_vm_aspace_swap(struct VMAddressSpace *from,
+       struct VMAddressSpace *to);
 bool arch_vm_supports_protection(uint32 protection);
 
 status_t arch_vm_set_memory_type(struct vm_area *area, addr_t physicalBase,

Modified: haiku/trunk/headers/private/kernel/team.h
===================================================================
--- haiku/trunk/headers/private/kernel/team.h   2009-12-01 17:26:22 UTC (rev 
34421)
+++ haiku/trunk/headers/private/kernel/team.h   2009-12-01 17:27:09 UTC (rev 
34422)
@@ -31,7 +31,7 @@
 team_id team_get_kernel_team_id(void);
 team_id team_get_current_team_id(void);
 status_t team_get_address_space(team_id id,
-                       struct vm_address_space **_addressSpace);
+                       struct VMAddressSpace **_addressSpace);
 char **user_team_get_arguments(void);
 int user_team_get_arg_count(void);
 struct job_control_entry* team_get_death_entry(struct team *team,

Modified: haiku/trunk/headers/private/kernel/thread_types.h
===================================================================
--- haiku/trunk/headers/private/kernel/thread_types.h   2009-12-01 17:26:22 UTC 
(rev 34421)
+++ haiku/trunk/headers/private/kernel/thread_types.h   2009-12-01 17:27:09 UTC 
(rev 34422)
@@ -187,7 +187,7 @@
        team_job_control_children *continued_children;
        struct job_control_entry* job_control_entry;
 
-       struct vm_address_space *address_space;
+       struct VMAddressSpace *address_space;
        struct thread   *main_thread;
        struct thread   *thread_list;
        struct team_loading_info *loading_info;

Modified: haiku/trunk/headers/private/kernel/vm.h
===================================================================
--- haiku/trunk/headers/private/kernel/vm.h     2009-12-01 17:26:22 UTC (rev 
34421)
+++ haiku/trunk/headers/private/kernel/vm.h     2009-12-01 17:27:09 UTC (rev 
34422)
@@ -18,10 +18,10 @@
 struct kernel_args;
 struct team;
 struct system_memory_info;
-struct vm_page;
+struct VMAddressSpace;
 struct VMCache;
 struct vm_area;
-struct vm_address_space;
+struct vm_page;
 struct vnode;
 
 
@@ -87,7 +87,7 @@
                        area_id sourceArea, bool kernel);
 status_t vm_delete_area(team_id teamID, area_id areaID, bool kernel);
 status_t vm_create_vnode_cache(struct vnode *vnode, struct VMCache **_cache);
-struct vm_area *vm_area_lookup(struct vm_address_space *addressSpace,
+struct vm_area *vm_area_lookup(struct VMAddressSpace *addressSpace,
                        addr_t address);
 status_t vm_set_area_memory_type(area_id id, addr_t physicalBase, uint32 type);
 status_t vm_get_page_mapping(team_id team, addr_t vaddr, addr_t *paddr);

Modified: haiku/trunk/headers/private/kernel/vm_address_space.h
===================================================================
--- haiku/trunk/headers/private/kernel/vm_address_space.h       2009-12-01 
17:26:22 UTC (rev 34421)
+++ haiku/trunk/headers/private/kernel/vm_address_space.h       2009-12-01 
17:27:09 UTC (rev 34422)
@@ -13,7 +13,7 @@
 
 
 struct kernel_args;
-struct vm_address_space;
+struct VMAddressSpace;
 
 
 #ifdef __cplusplus
@@ -23,17 +23,17 @@
 status_t vm_address_space_init(void);
 status_t vm_address_space_init_post_sem(void);
 
-void vm_delete_address_space(struct vm_address_space *aspace);
+void vm_delete_address_space(struct VMAddressSpace *aspace);
 status_t vm_create_address_space(team_id id, addr_t base, addr_t size,
-                       bool kernel, struct vm_address_space **_aspace);
-status_t vm_delete_areas(struct vm_address_space *aspace);
-struct vm_address_space *vm_get_kernel_address_space(void);
-struct vm_address_space *vm_kernel_address_space(void);
+                       bool kernel, struct VMAddressSpace **_aspace);
+status_t vm_delete_areas(struct VMAddressSpace *aspace);
+struct VMAddressSpace *vm_get_kernel_address_space(void);
+struct VMAddressSpace *vm_kernel_address_space(void);
 team_id vm_kernel_address_space_id(void);
-struct vm_address_space *vm_get_current_user_address_space(void);
+struct VMAddressSpace *vm_get_current_user_address_space(void);
 team_id vm_current_user_address_space_id(void);
-struct vm_address_space *vm_get_address_space(team_id team);
-void vm_put_address_space(struct vm_address_space *aspace);
+struct VMAddressSpace *vm_get_address_space(team_id team);
+void vm_put_address_space(struct VMAddressSpace *aspace);
 #define vm_swap_address_space(from, to) arch_vm_aspace_swap(from, to)
 
 #ifdef __cplusplus

Modified: haiku/trunk/headers/private/kernel/vm_types.h
===================================================================
--- haiku/trunk/headers/private/kernel/vm_types.h       2009-12-01 17:26:22 UTC 
(rev 34421)
+++ haiku/trunk/headers/private/kernel/vm_types.h       2009-12-01 17:27:09 UTC 
(rev 34422)
@@ -225,7 +225,7 @@
        virtual int32                   MaxPagesPerAsyncWrite() const
                                                                { return -1; } 
// no restriction
 
-       virtual status_t                Fault(struct vm_address_space *aspace,
+       virtual status_t                Fault(struct VMAddressSpace *aspace,
                                                                off_t offset);
 
        virtual void                    Merge(VMCache* source);
@@ -305,7 +305,7 @@
        vm_area_mappings                mappings;
        uint8*                                  page_protections;
 
-       struct vm_address_space* address_space;
+       struct VMAddressSpace*  address_space;
        struct vm_area*                 address_space_next;
        struct vm_area*                 cache_next;
        struct vm_area*                 cache_prev;
@@ -318,7 +318,7 @@
        VM_ASPACE_STATE_DELETION
 };
 
-struct vm_address_space {
+struct VMAddressSpace {
        struct vm_area*                 areas;
        struct vm_area*                 area_hint;
        rw_lock                                 lock;
@@ -330,7 +330,7 @@
        int32                                   ref_count;
        int32                                   fault_count;
        int32                                   state;
-       struct vm_address_space* hash_next;
+       struct VMAddressSpace*  hash_next;
 };
 
 

Modified: haiku/trunk/src/system/kernel/arch/arm/arch_vm.cpp
===================================================================
--- haiku/trunk/src/system/kernel/arch/arm/arch_vm.cpp  2009-12-01 17:26:22 UTC 
(rev 34421)
+++ haiku/trunk/src/system/kernel/arch/arm/arch_vm.cpp  2009-12-01 17:27:09 UTC 
(rev 34422)
@@ -73,7 +73,7 @@
 
 
 void
-arch_vm_aspace_swap(struct vm_address_space *from, struct vm_address_space *to)
+arch_vm_aspace_swap(struct VMAddressSpace *from, struct VMAddressSpace *to)
 {
 #warning ARM:WRITEME
 //     m68k_set_pgdir(m68k_translation_map_get_pgdir(&to->translation_map));

Modified: haiku/trunk/src/system/kernel/arch/m68k/arch_vm.cpp
===================================================================
--- haiku/trunk/src/system/kernel/arch/m68k/arch_vm.cpp 2009-12-01 17:26:22 UTC 
(rev 34421)
+++ haiku/trunk/src/system/kernel/arch/m68k/arch_vm.cpp 2009-12-01 17:27:09 UTC 
(rev 34422)
@@ -103,7 +103,7 @@
 
 
 void
-arch_vm_aspace_swap(struct vm_address_space *from, struct vm_address_space *to)
+arch_vm_aspace_swap(struct VMAddressSpace *from, struct VMAddressSpace *to)
 {
        m68k_set_pgdir(m68k_translation_map_get_pgdir(&to->translation_map));
 }

Modified: haiku/trunk/src/system/kernel/arch/mipsel/arch_vm.cpp
===================================================================
--- haiku/trunk/src/system/kernel/arch/mipsel/arch_vm.cpp       2009-12-01 
17:26:22 UTC (rev 34421)
+++ haiku/trunk/src/system/kernel/arch/mipsel/arch_vm.cpp       2009-12-01 
17:27:09 UTC (rev 34422)
@@ -66,7 +66,7 @@
 
 
 void
-arch_vm_aspace_swap(struct vm_address_space* from, struct vm_address_space* to)
+arch_vm_aspace_swap(struct VMAddressSpace* from, struct VMAddressSpace* to)
 {
 #warning IMPLEMENT arch_vm_aspace_swap
 }

Modified: haiku/trunk/src/system/kernel/arch/ppc/arch_vm.cpp
===================================================================
--- haiku/trunk/src/system/kernel/arch/ppc/arch_vm.cpp  2009-12-01 17:26:22 UTC 
(rev 34421)
+++ haiku/trunk/src/system/kernel/arch/ppc/arch_vm.cpp  2009-12-01 17:27:09 UTC 
(rev 34422)
@@ -144,7 +144,7 @@
 
 
 void
-arch_vm_aspace_swap(struct vm_address_space *from, struct vm_address_space *to)
+arch_vm_aspace_swap(struct VMAddressSpace *from, struct VMAddressSpace *to)
 {
 }
 

Modified: haiku/trunk/src/system/kernel/arch/ppc/arch_vm_translation_map.cpp
===================================================================
--- haiku/trunk/src/system/kernel/arch/ppc/arch_vm_translation_map.cpp  
2009-12-01 17:26:22 UTC (rev 34421)
+++ haiku/trunk/src/system/kernel/arch/ppc/arch_vm_translation_map.cpp  
2009-12-01 17:27:09 UTC (rev 34422)
@@ -681,7 +681,7 @@
        virtualAddress = ROUNDDOWN(virtualAddress, B_PAGE_SIZE);
        physicalAddress = ROUNDDOWN(physicalAddress, B_PAGE_SIZE);
 
-       vm_address_space *addressSpace = vm_kernel_address_space();
+       VMAddressSpace *addressSpace = vm_kernel_address_space();
 
        // map the pages
        for (; virtualAddress < virtualEnd;
@@ -703,7 +703,7 @@
        addr_t virtualEnd = ROUNDUP(virtualAddress + size, B_PAGE_SIZE);
        virtualAddress = ROUNDDOWN(virtualAddress, B_PAGE_SIZE);
 
-       vm_address_space *addressSpace = vm_kernel_address_space();
+       VMAddressSpace *addressSpace = vm_kernel_address_space();
 
        for (0; virtualAddress < virtualEnd; virtualAddress += B_PAGE_SIZE)
                remove_page_table_entry(&addressSpace->translation_map, 
virtualAddress);
@@ -716,7 +716,7 @@
        addr_t virtualAddress = ROUNDDOWN(*_virtualAddress, B_PAGE_SIZE);
        size = ROUNDUP(*_virtualAddress + size - virtualAddress, B_PAGE_SIZE);
 
-       vm_address_space *addressSpace = vm_kernel_address_space();
+       VMAddressSpace *addressSpace = vm_kernel_address_space();
 
        // reserve space in the address space
        void *newAddress = NULL;

Modified: haiku/trunk/src/system/kernel/arch/x86/arch_thread.cpp
===================================================================
--- haiku/trunk/src/system/kernel/arch/x86/arch_thread.cpp      2009-12-01 
17:26:22 UTC (rev 34421)
+++ haiku/trunk/src/system/kernel/arch/x86/arch_thread.cpp      2009-12-01 
17:27:09 UTC (rev 34422)
@@ -189,7 +189,7 @@
 void *
 x86_next_page_directory(struct thread *from, struct thread *to)
 {
-       vm_address_space* toAddressSpace = to->team->address_space;
+       VMAddressSpace* toAddressSpace = to->team->address_space;
        if (from->team->address_space == toAddressSpace) {
                // don't change the pgdir, same address space
                return NULL;
@@ -372,7 +372,7 @@
        struct cpu_ent* cpuData = to->cpu;
        vm_translation_map_arch_info* activeMap
                = cpuData->arch.active_translation_map;
-       vm_address_space* toAddressSpace = to->team->address_space;
+       VMAddressSpace* toAddressSpace = to->team->address_space;
 
        addr_t newPageDirectory;
        vm_translation_map_arch_info* toMap;

Modified: haiku/trunk/src/system/kernel/arch/x86/arch_vm.cpp
===================================================================
--- haiku/trunk/src/system/kernel/arch/x86/arch_vm.cpp  2009-12-01 17:26:22 UTC 
(rev 34421)
+++ haiku/trunk/src/system/kernel/arch/x86/arch_vm.cpp  2009-12-01 17:27:09 UTC 
(rev 34422)
@@ -617,7 +617,7 @@
 
 
 void
-arch_vm_aspace_swap(struct vm_address_space *from, struct vm_address_space *to)
+arch_vm_aspace_swap(struct VMAddressSpace *from, struct VMAddressSpace *to)
 {
        // This functions is only invoked when a userland thread is in the 
process
        // of dying. It switches to the kernel team and does whatever cleanup is

Modified: haiku/trunk/src/system/kernel/cache/vnode_store.cpp
===================================================================
--- haiku/trunk/src/system/kernel/cache/vnode_store.cpp 2009-12-01 17:26:22 UTC 
(rev 34421)
+++ haiku/trunk/src/system/kernel/cache/vnode_store.cpp 2009-12-01 17:27:09 UTC 
(rev 34422)
@@ -100,7 +100,7 @@
 
 
 status_t
-VMVnodeCache::Fault(struct vm_address_space *aspace, off_t offset)
+VMVnodeCache::Fault(struct VMAddressSpace *aspace, off_t offset)
 {
        return B_BAD_HANDLER;
 }

Modified: haiku/trunk/src/system/kernel/cache/vnode_store.h
===================================================================
--- haiku/trunk/src/system/kernel/cache/vnode_store.h   2009-12-01 17:26:22 UTC 
(rev 34421)
+++ haiku/trunk/src/system/kernel/cache/vnode_store.h   2009-12-01 17:27:09 UTC 
(rev 34422)
@@ -28,7 +28,7 @@
                                                        AsyncIOCallback* 
callback);
        virtual bool            CanWritePage(off_t offset);
 
-       virtual status_t        Fault(struct vm_address_space *aspace, off_t 
offset);
+       virtual status_t        Fault(struct VMAddressSpace *aspace, off_t 
offset);
 
        virtual status_t        AcquireUnreferencedStoreRef();
        virtual void            AcquireStoreRef();

Modified: haiku/trunk/src/system/kernel/team.cpp
===================================================================
--- haiku/trunk/src/system/kernel/team.cpp      2009-12-01 17:26:22 UTC (rev 
34421)
+++ haiku/trunk/src/system/kernel/team.cpp      2009-12-01 17:27:09 UTC (rev 
34422)
@@ -2522,7 +2522,7 @@
 
 
 status_t
-team_get_address_space(team_id id, vm_address_space** _addressSpace)
+team_get_address_space(team_id id, VMAddressSpace** _addressSpace)
 {
        cpu_status state;
        struct team* team;

Modified: haiku/trunk/src/system/kernel/vm/VMAnonymousCache.cpp
===================================================================
--- haiku/trunk/src/system/kernel/vm/VMAnonymousCache.cpp       2009-12-01 
17:26:22 UTC (rev 34421)
+++ haiku/trunk/src/system/kernel/vm/VMAnonymousCache.cpp       2009-12-01 
17:27:09 UTC (rev 34422)
@@ -684,7 +684,7 @@
 
 
 status_t
-VMAnonymousCache::Fault(struct vm_address_space *aspace, off_t offset)
+VMAnonymousCache::Fault(struct VMAddressSpace* aspace, off_t offset)
 {
        if (fCanOvercommit && LookupPage(offset) == NULL && !HasPage(offset)) {
                if (fGuardedSize > 0) {

Modified: haiku/trunk/src/system/kernel/vm/VMAnonymousCache.h
===================================================================
--- haiku/trunk/src/system/kernel/vm/VMAnonymousCache.h 2009-12-01 17:26:22 UTC 
(rev 34421)
+++ haiku/trunk/src/system/kernel/vm/VMAnonymousCache.h 2009-12-01 17:27:09 UTC 
(rev 34422)
@@ -50,7 +50,7 @@
        virtual int32           MaxPagesPerAsyncWrite() const
                                                        { return 1; }
 
-       virtual status_t        Fault(struct vm_address_space *aspace, off_t 
offset);
+       virtual status_t        Fault(struct VMAddressSpace* aspace, off_t 
offset);
 
        virtual void            Merge(VMCache* source);
 

Modified: haiku/trunk/src/system/kernel/vm/VMAnonymousNoSwapCache.cpp
===================================================================
--- haiku/trunk/src/system/kernel/vm/VMAnonymousNoSwapCache.cpp 2009-12-01 
17:26:22 UTC (rev 34421)
+++ haiku/trunk/src/system/kernel/vm/VMAnonymousNoSwapCache.cpp 2009-12-01 
17:27:09 UTC (rev 34422)
@@ -113,7 +113,7 @@
 
 
 status_t
-VMAnonymousNoSwapCache::Fault(struct vm_address_space *aspace, off_t offset)
+VMAnonymousNoSwapCache::Fault(struct VMAddressSpace *aspace, off_t offset)
 {
        if (fCanOvercommit) {
                if (fGuardedSize > 0) {

Modified: haiku/trunk/src/system/kernel/vm/VMAnonymousNoSwapCache.h
===================================================================
--- haiku/trunk/src/system/kernel/vm/VMAnonymousNoSwapCache.h   2009-12-01 
17:26:22 UTC (rev 34421)
+++ haiku/trunk/src/system/kernel/vm/VMAnonymousNoSwapCache.h   2009-12-01 
17:27:09 UTC (rev 34422)
@@ -27,7 +27,7 @@
        virtual status_t        Write(off_t offset, const iovec *vecs, size_t 
count,
                                                        uint32 flags, size_t 
*_numBytes);
 
-       virtual status_t        Fault(struct vm_address_space *aspace, off_t 
offset);
+       virtual status_t        Fault(struct VMAddressSpace *aspace, off_t 
offset);
 
        virtual void            MergeStore(VMCache* source);
 

Modified: haiku/trunk/src/system/kernel/vm/vm.cpp
===================================================================
--- haiku/trunk/src/system/kernel/vm/vm.cpp     2009-12-01 17:26:22 UTC (rev 
34421)
+++ haiku/trunk/src/system/kernel/vm/vm.cpp     2009-12-01 17:27:09 UTC (rev 
34422)
@@ -70,12 +70,12 @@
 class AddressSpaceReadLocker {
 public:
        AddressSpaceReadLocker(team_id team);
-       AddressSpaceReadLocker(vm_address_space* space, bool getNewReference);
+       AddressSpaceReadLocker(VMAddressSpace* space, bool getNewReference);
        AddressSpaceReadLocker();
        ~AddressSpaceReadLocker();
 
        status_t SetTo(team_id team);
-       void SetTo(vm_address_space* space, bool getNewReference);
+       void SetTo(VMAddressSpace* space, bool getNewReference);
        status_t SetFromArea(area_id areaID, vm_area*& area);
 
        bool IsLocked() const { return fLocked; }
@@ -84,10 +84,10 @@
 
        void Unset();
 
-       vm_address_space* AddressSpace() { return fSpace; }
+       VMAddressSpace* AddressSpace() { return fSpace; }
 
 private:
-       vm_address_space* fSpace;
+       VMAddressSpace* fSpace;
        bool    fLocked;
 };
 
@@ -109,10 +109,10 @@
        void DegradeToReadLock();
        void Unset();
 
-       vm_address_space* AddressSpace() { return fSpace; }
+       VMAddressSpace* AddressSpace() { return fSpace; }
 
 private:
-       vm_address_space* fSpace;
+       VMAddressSpace* fSpace;
        bool    fLocked;
        bool    fDegraded;
 };
@@ -123,9 +123,9 @@
        ~MultiAddressSpaceLocker();
 
        inline status_t AddTeam(team_id team, bool writeLock,
-               vm_address_space** _space = NULL);
+               VMAddressSpace** _space = NULL);
        inline status_t AddArea(area_id area, bool writeLock,
-               vm_address_space** _space = NULL);
+               VMAddressSpace** _space = NULL);
 
        status_t AddAreaCacheAndLock(area_id areaID, bool writeLockThisOne,
                bool writeLockOthers, vm_area*& _area, vm_cache** _cache = 
NULL);
@@ -138,14 +138,14 @@
 
 private:
        struct lock_item {
-               vm_address_space*       space;
-               bool                            write_lock;
+               VMAddressSpace* space;
+               bool                    write_lock;
        };
 
        bool _ResizeIfNeeded();
-       int32 _IndexOfAddressSpace(vm_address_space* space) const;
-       status_t _AddAddressSpace(vm_address_space* space, bool writeLock,
-               vm_address_space** _space);
+       int32 _IndexOfAddressSpace(VMAddressSpace* space) const;
+       status_t _AddAddressSpace(VMAddressSpace* space, bool writeLock,
+               VMAddressSpace** _space);
 
        static int _CompareItems(const void* _a, const void* _b);
 
@@ -217,11 +217,11 @@
 
 
 // function declarations
-static void delete_area(vm_address_space* addressSpace, vm_area* area);
-static vm_address_space* get_address_space_by_area_id(area_id id);
-static status_t vm_soft_fault(vm_address_space* addressSpace, addr_t address,
+static void delete_area(VMAddressSpace* addressSpace, vm_area* area);
+static VMAddressSpace* get_address_space_by_area_id(area_id id);
+static status_t vm_soft_fault(VMAddressSpace* addressSpace, addr_t address,
        bool isWrite, bool isUser);
-static status_t map_backing_store(vm_address_space* addressSpace,
+static status_t map_backing_store(VMAddressSpace* addressSpace,
        vm_cache* cache, void** _virtualAddress, off_t offset, addr_t size,
        uint32 addressSpec, int wiring, int protection, int mapping,
        vm_area** _area, const char* areaName, bool unmapAddressRange, bool 
kernel);
@@ -245,7 +245,7 @@
 /*! Takes over the reference of the address space, if \a getNewReference is
        \c false.
 */
-AddressSpaceReadLocker::AddressSpaceReadLocker(vm_address_space* space,
+AddressSpaceReadLocker::AddressSpaceReadLocker(VMAddressSpace* space,
                bool getNewReference)
        :
        fSpace(NULL),
@@ -295,7 +295,7 @@
        \c false.
 */
 void
-AddressSpaceReadLocker::SetTo(vm_address_space* space, bool getNewReference)
+AddressSpaceReadLocker::SetTo(VMAddressSpace* space, bool getNewReference)
 {
        fSpace = space;
 
@@ -545,7 +545,7 @@
 
 
 int32
-MultiAddressSpaceLocker::_IndexOfAddressSpace(vm_address_space* space) const
+MultiAddressSpaceLocker::_IndexOfAddressSpace(VMAddressSpace* space) const
 {
        for (int32 i = 0; i < fCount; i++) {
                if (fItems[i].space == space)
@@ -557,8 +557,8 @@
 
 
 status_t
-MultiAddressSpaceLocker::_AddAddressSpace(vm_address_space* space,
-       bool writeLock, vm_address_space** _space)
+MultiAddressSpaceLocker::_AddAddressSpace(VMAddressSpace* space,
+       bool writeLock, VMAddressSpace** _space)
 {
        if (!space)
                return B_BAD_VALUE;
@@ -590,7 +590,7 @@
 
 inline status_t
 MultiAddressSpaceLocker::AddTeam(team_id team, bool writeLock,
-       vm_address_space** _space)
+       VMAddressSpace** _space)
 {
        return _AddAddressSpace(vm_get_address_space(team), writeLock,
                _space);
@@ -599,7 +599,7 @@
 
 inline status_t
 MultiAddressSpaceLocker::AddArea(area_id area, bool writeLock,
-       vm_address_space** _space)
+       VMAddressSpace** _space)
 {
        return _AddAddressSpace(get_address_space_by_area_id(area), writeLock,
                _space);
@@ -918,10 +918,10 @@
 }
 
 
-static vm_address_space*
+static VMAddressSpace*
 get_address_space_by_area_id(area_id id)
 {
-       vm_address_space* addressSpace = NULL;
+       VMAddressSpace* addressSpace = NULL;
 
        rw_lock_read_lock(&sAreaHashLock);
 
@@ -939,7 +939,7 @@
 
 //! You need to have the address space locked when calling this function
 static vm_area*
-lookup_area(vm_address_space* addressSpace, area_id id)
+lookup_area(VMAddressSpace* addressSpace, area_id id)
 {
        rw_lock_read_lock(&sAreaHashLock);
 
@@ -954,7 +954,7 @@
 
 
 static vm_area*
-create_reserved_area_struct(vm_address_space* addressSpace, uint32 flags)
+create_reserved_area_struct(VMAddressSpace* addressSpace, uint32 flags)
 {
        vm_area* reserved = (vm_area*)malloc_nogrow(sizeof(vm_area));
        if (reserved == NULL)
@@ -971,7 +971,7 @@
 
 
 static vm_area*
-create_area_struct(vm_address_space* addressSpace, const char* name,
+create_area_struct(VMAddressSpace* addressSpace, const char* name,
        uint32 wiring, uint32 protection)
 {
        // restrict the area name to B_OS_NAME_LENGTH
@@ -1016,7 +1016,7 @@
        there are reserved regions for the remaining parts.
 */
 static status_t
-find_reserved_area(vm_address_space* addressSpace, addr_t start,
+find_reserved_area(VMAddressSpace* addressSpace, addr_t start,
        addr_t size, vm_area* area)
 {
        vm_area* last = NULL;
@@ -1112,7 +1112,7 @@
 
 /*!    Must be called with this address space's write lock held */
 static status_t
-find_and_insert_area_slot(vm_address_space* addressSpace, addr_t start,
+find_and_insert_area_slot(VMAddressSpace* addressSpace, addr_t start,
        addr_t size, addr_t end, uint32 addressSpec, vm_area* area)
 {
        vm_area* last = NULL;
@@ -1349,10 +1349,10 @@
 /*!    This inserts the area you pass into the specified address space.
        It will also set the "_address" argument to its base address when
        the call succeeds.
-       You need to hold the vm_address_space write lock.
+       You need to hold the VMAddressSpace write lock.
 */
 static status_t
-insert_area(vm_address_space* addressSpace, void** _address,
+insert_area(VMAddressSpace* addressSpace, void** _address,
        uint32 addressSpec, addr_t size, vm_area* area)
 {
        addr_t searchBase, searchEnd;
@@ -1388,7 +1388,7 @@
                searchEnd, addressSpec, area);
        if (status == B_OK) {
                *_address = (void*)area->base;
-               
+
                if (addressSpace == vm_kernel_address_space())
                        sKernelAddressSpaceLeft -= area->size;
        }
@@ -1436,7 +1436,7 @@
        The address space must be write locked.
 */
 static status_t
-cut_area(vm_address_space* addressSpace, vm_area* area, addr_t address,
+cut_area(VMAddressSpace* addressSpace, vm_area* area, addr_t address,
        addr_t lastAddress, vm_area** _secondArea, bool kernel)
 {
        // Does the cut range intersect with the area at all?
@@ -1561,7 +1561,7 @@
        The address space must be write-locked.
 */
 static status_t
-unmap_address_range(vm_address_space* addressSpace, addr_t address, addr_t 
size,
+unmap_address_range(VMAddressSpace* addressSpace, addr_t address, addr_t size,
        bool kernel)
 {
        size = PAGE_ALIGN(size);
@@ -1614,7 +1614,7 @@
        Note, that in case of error your cache will be temporarily unlocked.
 */
 static status_t
-map_backing_store(vm_address_space* addressSpace, vm_cache* cache,
+map_backing_store(VMAddressSpace* addressSpace, vm_cache* cache,
        void** _virtualAddress, off_t offset, addr_t size, uint32 addressSpec,
        int wiring, int protection, int mapping, vm_area** _area,
        const char* areaName, bool unmapAddressRange, bool kernel)
@@ -1736,7 +1736,7 @@
        if (status != B_OK)
                return status;
 
-       vm_address_space* addressSpace = locker.AddressSpace();
+       VMAddressSpace* addressSpace = locker.AddressSpace();
 
        // create an anonymous cache
        vm_cache* cache;
@@ -1950,7 +1950,7 @@
        }
 
        AddressSpaceWriteLocker locker;
-       vm_address_space* addressSpace;
+       VMAddressSpace* addressSpace;
        status_t status;
 
        // For full lock areas reserve the pages before locking the address
@@ -2634,12 +2634,12 @@
        // Now lock both address spaces and actually do the cloning.
 
        MultiAddressSpaceLocker locker;
-       vm_address_space* sourceAddressSpace;
+       VMAddressSpace* sourceAddressSpace;
        status_t status = locker.AddArea(sourceID, false, &sourceAddressSpace);
        if (status != B_OK)
                return status;
 
-       vm_address_space* targetAddressSpace;
+       VMAddressSpace* targetAddressSpace;
        status = locker.AddTeam(team, true, &targetAddressSpace);
        if (status != B_OK)
                return status;
@@ -2745,7 +2745,7 @@
 
 //! The address space must be write locked at this point
 static void
-remove_area_from_address_space(vm_address_space* addressSpace, vm_area* area)
+remove_area_from_address_space(VMAddressSpace* addressSpace, vm_area* area)
 {
        vm_area* temp = addressSpace->areas;
        vm_area* last = NULL;
@@ -2775,7 +2775,7 @@
 
 
 static void
-delete_area(vm_address_space* addressSpace, vm_area* area)
+delete_area(VMAddressSpace* addressSpace, vm_area* area)
 {
        rw_lock_write_lock(&sAreaHashLock);
        hash_remove(sAreaHash, area);
@@ -2908,7 +2908,7 @@
        // Do the locking: target address space, all address spaces associated 
with
        // the source cache, and the cache itself.
        MultiAddressSpaceLocker locker;
-       vm_address_space* targetAddressSpace;
+       VMAddressSpace* targetAddressSpace;
        vm_cache* cache;
        vm_area* source;
        status_t status = locker.AddTeam(team, true, &targetAddressSpace);
@@ -3089,7 +3089,7 @@
 status_t
 vm_get_page_mapping(team_id team, addr_t vaddr, addr_t* paddr)
 {
-       vm_address_space* addressSpace = vm_get_address_space(team);
+       VMAddressSpace* addressSpace = vm_get_address_space(team);
        if (addressSpace == NULL)
                return B_BAD_TEAM_ID;
 
@@ -4065,7 +4065,7 @@
 
 
 status_t
-vm_delete_areas(struct vm_address_space* addressSpace)
+vm_delete_areas(struct VMAddressSpace* addressSpace)
 {
        vm_area* area;
        vm_area* next;
@@ -4634,7 +4634,7 @@
        TPF(PageFaultStart(address, isWrite, isUser, faultAddress));
 
        addr_t pageAddress = ROUNDDOWN(address, B_PAGE_SIZE);
-       vm_address_space* addressSpace = NULL;
+       VMAddressSpace* addressSpace = NULL;
 
        status_t status = B_OK;
        *newIP = 0;
@@ -4854,7 +4854,7 @@
        bool                                    restart;
 
 
-       PageFaultContext(vm_address_space* addressSpace, bool isWrite)
+       PageFaultContext(VMAddressSpace* addressSpace, bool isWrite)
                :
                addressSpaceLocker(addressSpace, true),
                map(&addressSpace->translation_map),
@@ -5023,7 +5023,7 @@
 
 
 static status_t
-vm_soft_fault(vm_address_space* addressSpace, addr_t originalAddress,
+vm_soft_fault(VMAddressSpace* addressSpace, addr_t originalAddress,
        bool isWrite, bool isUser)
 {
        FTRACE(("vm_soft_fault: thid 0x%lx address 0x%lx, isWrite %d, isUser 
%d\n",
@@ -5172,7 +5172,7 @@
 
 /*! You must have the address space's sem held */
 vm_area*
-vm_area_lookup(vm_address_space* addressSpace, addr_t address)
+vm_area_lookup(VMAddressSpace* addressSpace, addr_t address)
 {
        vm_area* area;
 
@@ -5402,7 +5402,7 @@
        Used by both lock_memory() and unlock_memory().
 */
 static status_t
-test_lock_memory(vm_address_space* addressSpace, addr_t address,
+test_lock_memory(VMAddressSpace* addressSpace, addr_t address,
        bool& needsLocking)
 {
        rw_lock_read_lock(&addressSpace->lock);
@@ -5645,7 +5645,7 @@
 status_t
 lock_memory_etc(team_id team, void* address, size_t numBytes, uint32 flags)
 {
-       vm_address_space* addressSpace = NULL;
+       VMAddressSpace* addressSpace = NULL;
        struct vm_translation_map* map;
        addr_t unalignedBase = (addr_t)address;
        addr_t end = unalignedBase + numBytes;
@@ -5751,7 +5751,7 @@
 status_t
 unlock_memory_etc(team_id team, void* address, size_t numBytes, uint32 flags)
 {
-       vm_address_space* addressSpace = NULL;
+       VMAddressSpace* addressSpace = NULL;
        struct vm_translation_map* map;
        addr_t unalignedBase = (addr_t)address;
        addr_t end = unalignedBase + numBytes;
@@ -5827,7 +5827,7 @@
        uint32 numEntries = *_numEntries;
        *_numEntries = 0;
 
-       vm_address_space* addressSpace;
+       VMAddressSpace* addressSpace;
        addr_t virtualAddress = (addr_t)address;
        addr_t pageOffset = virtualAddress & (B_PAGE_SIZE - 1);
        addr_t physicalAddress;

Modified: haiku/trunk/src/system/kernel/vm/vm_address_space.cpp
===================================================================
--- haiku/trunk/src/system/kernel/vm/vm_address_space.cpp       2009-12-01 
17:26:22 UTC (rev 34421)
+++ haiku/trunk/src/system/kernel/vm/vm_address_space.cpp       2009-12-01 
17:27:09 UTC (rev 34422)
@@ -27,7 +27,7 @@
 #endif
 
 
-static vm_address_space* sKernelAddressSpace;
+static VMAddressSpace* sKernelAddressSpace;
 
 #define ASPACE_HASH_TABLE_SIZE 1024
 static struct hash_table* sAddressSpaceTable;
@@ -35,7 +35,7 @@
 
 
 static void
-_dump_aspace(vm_address_space* aspace)
+_dump_aspace(VMAddressSpace* aspace)
 {
        vm_area* area;
 
@@ -62,7 +62,7 @@
 static int
 dump_aspace(int argc, char** argv)
 {
-       vm_address_space* aspace;
+       VMAddressSpace* aspace;
 
        if (argc < 2) {
                kprintf("aspace: not enough arguments\n");
@@ -74,7 +74,7 @@
        {
                team_id id = strtoul(argv[1], NULL, 0);
 
-               aspace = (vm_address_space*)hash_lookup(sAddressSpaceTable, 
&id);
+               aspace = (VMAddressSpace*)hash_lookup(sAddressSpaceTable, &id);
                if (aspace == NULL) {
                        kprintf("invalid aspace id\n");
                } else {
@@ -89,14 +89,14 @@
 static int
 dump_aspace_list(int argc, char** argv)
 {
-       vm_address_space* space;
+       VMAddressSpace* space;
        struct hash_iterator iter;
 
        kprintf("   address      id         base         size   area count   "
                " area size\n");
 
        hash_open(sAddressSpaceTable, &iter);
-       while ((space = (vm_address_space*)hash_next(sAddressSpaceTable,
+       while ((space = (VMAddressSpace*)hash_next(sAddressSpaceTable,
                        &iter)) != NULL) {
                int32 areaCount = 0;
                off_t areaSize = 0;
@@ -119,7 +119,7 @@
 static int
 aspace_compare(void* _a, const void* key)
 {
-       vm_address_space* aspace = (vm_address_space*)_a;
+       VMAddressSpace* aspace = (VMAddressSpace*)_a;
        const team_id* id = (const team_id*)key;
 
        if (aspace->id == *id)
@@ -132,7 +132,7 @@
 static uint32
 aspace_hash(void* _a, const void* key, uint32 range)
 {
-       vm_address_space* aspace = (vm_address_space*)_a;
+       VMAddressSpace* aspace = (VMAddressSpace*)_a;
        const team_id* id = (const team_id*)key;
 
        if (aspace != NULL)
@@ -146,7 +146,7 @@
        have been released, so it's safe to remove it.
 */
 static void
-delete_address_space(vm_address_space* addressSpace)
+delete_address_space(VMAddressSpace* addressSpace)
 {
        TRACE(("delete_address_space: called on aspace 0x%lx\n", 
addressSpace->id));
 
@@ -165,13 +165,13 @@
 //     #pragma mark -
 
 
-vm_address_space*
+VMAddressSpace*
 vm_get_address_space(team_id id)
 {
-       vm_address_space* addressSpace;
+       VMAddressSpace* addressSpace;
 
        rw_lock_read_lock(&sAddressSpaceTableLock);
-       addressSpace = (vm_address_space*)hash_lookup(sAddressSpaceTable, &id);
+       addressSpace = (VMAddressSpace*)hash_lookup(sAddressSpaceTable, &id);
        if (addressSpace)
                atomic_add(&addressSpace->ref_count, 1);
        rw_lock_read_unlock(&sAddressSpaceTableLock);
@@ -180,7 +180,7 @@
 }
 
 
-vm_address_space*
+VMAddressSpace*
 vm_get_kernel_address_space(void)
 {
        // we can treat this one a little differently since it can't be deleted
@@ -189,7 +189,7 @@
 }
 
 
-vm_address_space*
+VMAddressSpace*
 vm_kernel_address_space(void)
 {
        return sKernelAddressSpace;
@@ -203,13 +203,13 @@
 }
 
 
-vm_address_space*
+VMAddressSpace*
 vm_get_current_user_address_space(void)
 {
        struct thread* thread = thread_get_current_thread();
 
        if (thread != NULL) {
-               vm_address_space* addressSpace = thread->team->address_space;
+               VMAddressSpace* addressSpace = thread->team->address_space;
                if (addressSpace != NULL) {
                        atomic_add(&addressSpace->ref_count, 1);
                        return addressSpace;
@@ -233,7 +233,7 @@
 
 
 void
-vm_put_address_space(vm_address_space* addressSpace)
+vm_put_address_space(VMAddressSpace* addressSpace)
 {
        bool remove = false;
 
@@ -257,7 +257,7 @@
        still be in memory until the last reference has been released.
 */
 void
-vm_delete_address_space(vm_address_space* addressSpace)
+vm_delete_address_space(VMAddressSpace* addressSpace)
 {
        rw_lock_write_lock(&addressSpace->lock);
        addressSpace->state = VM_ASPACE_STATE_DELETION;
@@ -270,12 +270,12 @@
 
 status_t
 vm_create_address_space(team_id id, addr_t base, addr_t size,
-       bool kernel, vm_address_space** _addressSpace)
+       bool kernel, VMAddressSpace** _addressSpace)
 {
-       vm_address_space* addressSpace;
+       VMAddressSpace* addressSpace;
        status_t status;
 
-       addressSpace = 
(vm_address_space*)malloc_nogrow(sizeof(vm_address_space));
+       addressSpace = (VMAddressSpace*)malloc_nogrow(sizeof(VMAddressSpace));
        if (addressSpace == NULL)
                return B_NO_MEMORY;
 
@@ -321,7 +321,7 @@
 
        // create the area and address space hash tables
        {
-               vm_address_space* aspace;
+               VMAddressSpace* aspace;
                sAddressSpaceTable = hash_init(ASPACE_HASH_TABLE_SIZE,
                        (addr_t)&aspace->hash_next - (addr_t)aspace, 
&aspace_compare,
                        &aspace_hash);

Modified: haiku/trunk/src/system/kernel/vm/vm_cache.cpp
===================================================================
--- haiku/trunk/src/system/kernel/vm/vm_cache.cpp       2009-12-01 17:26:22 UTC 
(rev 34421)
+++ haiku/trunk/src/system/kernel/vm/vm_cache.cpp       2009-12-01 17:27:09 UTC 
(rev 34422)
@@ -915,7 +915,7 @@
 
 
 status_t
-VMCache::Fault(struct vm_address_space *aspace, off_t offset)
+VMCache::Fault(struct VMAddressSpace *aspace, off_t offset)
 {
        return B_BAD_ADDRESS;
 }

Modified: haiku/trunk/src/system/kernel/vm/vm_page.cpp
===================================================================
--- haiku/trunk/src/system/kernel/vm/vm_page.cpp        2009-12-01 17:26:22 UTC 
(rev 34421)
+++ haiku/trunk/src/system/kernel/vm/vm_page.cpp        2009-12-01 17:27:09 UTC 
(rev 34422)
@@ -536,7 +536,7 @@
 
        if (index == 2) {
                if (!physical) {
-                       vm_address_space *addressSpace = 
vm_kernel_address_space();
+                       VMAddressSpace *addressSpace = 
vm_kernel_address_space();
                        uint32 flags;
 
                        if (thread_get_current_thread()->team->address_space != 
NULL)


Other related posts:

  • » [haiku-commits] r34422 - in haiku/trunk: headers/private/kernel headers/private/kernel/arch src/system/kernel src/system/kernel/arch/arm src/system/kernel/arch/m68k ... - ingo_weinhold