Changeset 567 for trunk/kernel/mm/vseg.c
- Timestamp:
- Oct 5, 2018, 12:01:52 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/vseg.c
r503 r567 35 35 #include <ppm.h> 36 36 #include <mapper.h> 37 #include <spinlock.h>38 37 #include <vfs.h> 39 38 #include <page.h> … … 159 158 160 159 // initialize vseg with remote_read access 161 vseg->type = hal_remote_l w( XPTR( cxy , &ptr->type ) );160 vseg->type = hal_remote_l32 ( XPTR( cxy , &ptr->type ) ); 162 161 vseg->min = (intptr_t)hal_remote_lpt( XPTR( cxy , &ptr->min ) ); 163 162 vseg->max = (intptr_t)hal_remote_lpt( XPTR( cxy , &ptr->max ) ); 164 vseg->vpn_base = hal_remote_l w( XPTR( cxy , &ptr->vpn_base ) );165 vseg->vpn_size = hal_remote_l w( XPTR( cxy , &ptr->vpn_size ) );166 vseg->flags = hal_remote_l w( XPTR( cxy , &ptr->flags ) );167 vseg->file_offset = hal_remote_l w( XPTR( cxy , &ptr->file_offset ) );168 vseg->file_size = hal_remote_l w( XPTR( cxy , &ptr->file_size ) );169 vseg->mapper_xp = (xptr_t) hal_remote_l wd( XPTR( cxy , &ptr->mapper_xp ) );163 vseg->vpn_base = hal_remote_l32 ( XPTR( cxy , &ptr->vpn_base ) ); 164 vseg->vpn_size = hal_remote_l32 ( XPTR( cxy , &ptr->vpn_size ) ); 165 vseg->flags = hal_remote_l32 ( XPTR( cxy , &ptr->flags ) ); 166 vseg->file_offset = hal_remote_l32 ( XPTR( cxy , &ptr->file_offset ) ); 167 vseg->file_size = hal_remote_l32 ( XPTR( cxy , &ptr->file_size ) ); 168 vseg->mapper_xp = (xptr_t) hal_remote_l64( XPTR( cxy , &ptr->mapper_xp ) ); 170 169 171 170 switch (vseg->type) … … 186 185 case VSEG_TYPE_REMOTE: 187 186 { 188 vseg->cxy = (cxy_t) hal_remote_l w( XPTR(cxy, &ptr->cxy) );187 vseg->cxy = (cxy_t) hal_remote_l32( XPTR(cxy, &ptr->cxy) ); 189 188 break; 190 189 } … … 197 196 } 198 197 199 ///////////////////////////////200 void vseg_attach( vmm_t * vmm,201 vseg_t * vseg )202 {203 // update vseg descriptor204 vseg->vmm = vmm;205 198 206 // add vseg in vmm list207 xlist_add_last( XPTR( local_cxy , &vmm->vsegs_root ),208 XPTR( local_cxy , &vseg->xlist ) );209 }210 211 /////////////////////////////////212 void vseg_detach( vseg_t * vseg )213 {214 // update vseg descriptor215 vseg->vmm = NULL;216 217 // remove vseg from vmm list218 xlist_unlink( XPTR( local_cxy , &vseg->xlist ) );219 }220
Note: See TracChangeset
for help on using the changeset viewer.