Changeset 567 for trunk/kernel/mm/vmm.h
- Timestamp:
- Oct 5, 2018, 12:01:52 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/vmm.h
r469 r567 30 30 #include <bits.h> 31 31 #include <list.h> 32 #include < spinlock.h>32 #include <queuelock.h> 33 33 #include <hal_gpt.h> 34 34 #include <vseg.h> … … 54 54 typedef struct stack_mgr_s 55 55 { 56 spinlock_t lock; /*! lock protecting STACK allocator */56 busylock_t lock; /*! lock protecting STACK allocator */ 57 57 vpn_t vpn_base; /*! first page of STACK zone */ 58 58 bitmap_t bitmap; /*! bit bector of allocated stacks */ … … 79 79 typedef struct mmap_mgr_s 80 80 { 81 spinlock_t lock; /*! lock protecting MMAP allocator */81 busylock_t lock; /*! lock protecting MMAP allocator */ 82 82 vpn_t vpn_base; /*! first page of MMAP zone */ 83 83 vpn_t vpn_size; /*! number of pages in MMAP zone */ … … 90 90 * This structure defines the Virtual Memory Manager for a given process in a given cluster. 91 91 * This local VMM provides four main services: 92 * 1) It registers all vsegs in the local copy of the vseg list (VSL).93 * 2) It contains the local copy of the generic page table (GPT) .92 * 1) It contains the local copy of vseg list (VSL), only complete in referrence. 93 * 2) It contains the local copy of the generic page table (GPT), only complete in reference. 94 94 * 3) The stack manager dynamically allocates virtual memory space for the STACK vsegs. 95 95 * 4) The mmap manager dynamically allocates virtual memory for the (FILE/ANON/REMOTE) vsegs. … … 105 105 typedef struct vmm_s 106 106 { 107 remote_rwlock_t vsegs_lock; /*! lock protecting the vsegs list*/107 remote_rwlock_t vsegs_lock; /*! lock protecting the local VSL */ 108 108 xlist_entry_t vsegs_root; /*! VSL root (VSL only complete in reference) */ 109 109 uint32_t vsegs_nr; /*! total number of local vsegs */ … … 153 153 void vmm_display( struct process_s * process, 154 154 bool_t mapping ); 155 156 /******************************************************************************************* 157 * This function adds a vseg descriptor in the VSL of a given VMM, 158 * and updates the vmm field in the vseg descriptor. 159 * It takes the lock protecting VSL. 160 ******************************************************************************************* 161 * @ vmm : pointer on the VMM 162 * @ vseg : pointer on the vseg descriptor 163 ******************************************************************************************/ 164 void vmm_vseg_attach( struct vmm_s * vmm, 165 vseg_t * vseg ); 166 167 /******************************************************************************************* 168 * This function removes a vseg descriptor from the set of vsegs controlled by a given VMM, 169 * and updates the vmm field in the vseg descriptor. No memory is released. 170 * It takes the lock protecting VSL. 171 ******************************************************************************************* 172 * @ vmm : pointer on the VMM 173 * @ vseg : pointer on the vseg descriptor 174 ******************************************************************************************/ 175 void vmm_vseg_detach( struct vmm_s * vmm, 176 vseg_t * vseg ); 155 177 156 178 /*********************************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.