Changeset 567 for trunk/kernel/mm/vseg.c


Ignore:
Timestamp:
Oct 5, 2018, 12:01:52 AM (6 years ago)
Author:
alain
Message:

Complete restructuration of kernel locks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/mm/vseg.c

    r503 r567  
    3535#include <ppm.h>
    3636#include <mapper.h>
    37 #include <spinlock.h>
    3837#include <vfs.h>
    3938#include <page.h>
     
    159158
    160159    // initialize vseg with remote_read access
    161     vseg->type        =           hal_remote_lw ( XPTR( cxy , &ptr->type        ) );
     160    vseg->type        =           hal_remote_l32 ( XPTR( cxy , &ptr->type        ) );
    162161    vseg->min         = (intptr_t)hal_remote_lpt( XPTR( cxy , &ptr->min         ) );
    163162    vseg->max         = (intptr_t)hal_remote_lpt( XPTR( cxy , &ptr->max         ) );
    164     vseg->vpn_base    =           hal_remote_lw ( XPTR( cxy , &ptr->vpn_base    ) );
    165     vseg->vpn_size    =           hal_remote_lw ( XPTR( cxy , &ptr->vpn_size    ) );
    166     vseg->flags       =           hal_remote_lw ( XPTR( cxy , &ptr->flags       ) );
    167     vseg->file_offset =           hal_remote_lw ( XPTR( cxy , &ptr->file_offset ) );
    168     vseg->file_size   =           hal_remote_lw ( XPTR( cxy , &ptr->file_size   ) );
    169         vseg->mapper_xp   = (xptr_t)  hal_remote_lwd( 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   ) );
    170169
    171170    switch (vseg->type)
     
    186185        case VSEG_TYPE_REMOTE:
    187186        {
    188             vseg->cxy = (cxy_t) hal_remote_lw( XPTR(cxy, &ptr->cxy) );
     187            vseg->cxy = (cxy_t) hal_remote_l32( XPTR(cxy, &ptr->cxy) );
    189188            break;
    190189        }
     
    197196}
    198197
    199 ///////////////////////////////
    200 void vseg_attach( vmm_t  * vmm,
    201                   vseg_t * vseg )
    202 {
    203     // update vseg descriptor
    204     vseg->vmm = vmm;
    205198
    206     // add vseg in vmm list
    207     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 descriptor
    215     vseg->vmm = NULL;
    216 
    217     // remove vseg from vmm list
    218     xlist_unlink( XPTR( local_cxy , &vseg->xlist ) );
    219 }
    220 
Note: See TracChangeset for help on using the changeset viewer.