Changeset 568 for trunk/kernel/fs/vfs.c


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

omplete restructuration of kernel locks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/fs/vfs.c

    r561 r568  
    2828#include <hal_atomic.h>
    2929#include <hal_special.h>
    30 #include <readlock.h>
    31 #include <spinlock.h>
    3230#include <printk.h>
    3331#include <list.h>
     
    4341#include <chdev.h>
    4442#include <process.h>
     43#include <cluster.h>
    4544#include <vfs.h>
    4645#include <fatfs.h>
     
    5554
    5655extern vfs_ctx_t          fs_context[FS_TYPES_NR];    // allocated in kernel_init.c
    57 
    5856extern chdev_directory_t  chdev_dir;                  // allocated in kernel_init.c 
     57extern char *             lock_type_str[];            // allocated in kernel_init.c
    5958 
    6059//////////////////////////////////////////////////////////////////////////////////////////
     
    7978    vfs_ctx->extend         = extend;
    8079
    81     spinlock_init( &vfs_ctx->lock );
     80    busylock_init( &vfs_ctx->lock , LOCK_VFS_CTX );
    8281
    8382    bitmap_init( vfs_ctx->bitmap , BITMAP_SIZE(CONFIG_VFS_MAX_INODES) );
     
    8988{
    9089    // get lock on inum allocator
    91     spinlock_lock( &ctx->lock );
     90    busylock_acquire( &ctx->lock );
    9291
    9392    // get lid from local inum allocator
     
    9796    {
    9897        // release lock
    99         spinlock_unlock( &ctx->lock );
     98        busylock_release( &ctx->lock );
    10099
    101100        // return error
     
    108107
    109108        // release lock
    110         spinlock_unlock( &ctx->lock );
     109        busylock_release( &ctx->lock );
    111110
    112111        // return inum
     
    160159
    161160#if DEBUG_VFS_INODE_CREATE
    162 uint32_t cycle = (uint32_t)hal_get_cycles();
     161char           name[CONFIG_VFS_MAX_NAME_LENGTH];
     162uint32_t       cycle      = (uint32_t)hal_get_cycles();
     163cxy_t          dentry_cxy = GET_CXY( dentry_xp );
     164vfs_dentry_t * dentry_ptr = GET_PTR( dentry_xp );
     165thread_t *     this       = CURRENT_THREAD;
     166if( dentry_xp != XPTR_NULL ) hal_remote_strcpy( XPTR( local_cxy  , name ),
     167                                                XPTR( dentry_cxy , dentry_ptr->name ) );
     168else                         strcpy( name , "/" );
    163169if( DEBUG_VFS_INODE_CREATE < cycle )
    164 printk("\n[DBG] %s : thread %x enter / dentry = %x in cluster %x / cycle %d\n",
    165 __FUNCTION__, CURRENT_THREAD, GET_PTR(dentry_xp), GET_CXY(dentry_xp), cycle );
     170printk("\n[DBG] %s : thread %x in process %x enter for <%s> / cycle %d\n",
     171__FUNCTION__, this->trdid, this->process->pid, name, cycle );
    166172#endif
    167173 
     
    232238    xhtab_init( &inode->children , XHTAB_DENTRY_TYPE );
    233239
    234     // initialize inode locks
    235     remote_rwlock_init( XPTR( local_cxy , &inode->data_lock ) );
    236     remote_spinlock_init( XPTR( local_cxy , &inode->main_lock ) );
     240    // initialize inode lock
     241    remote_rwlock_init( XPTR( local_cxy , &inode->data_lock ), LOCK_VFS_INODE );
     242
     243    // initialise lock protecting inode three traversal
     244    remote_busylock_init( XPTR( local_cxy , &inode->main_lock ), LOCK_VFS_MAIN );
    237245
    238246#if DEBUG_VFS_INODE_CREATE
    239 cycle = (uint32_t)hal_get_cycles();
     247cycle      = (uint32_t)hal_get_cycles();
    240248if( DEBUG_VFS_INODE_CREATE < cycle )
    241 printk("\n[DBG] %s : thread %x exit / inode = %x in cluster %x / cycle %d\n",
    242 __FUNCTION__, CURRENT_THREAD, inode, local_cxy, cycle );
     249printk("\n[DBG] %s : thread %x in process %x exit for <%s> / inode [%x,%x] / cycle %d\n",
     250__FUNCTION__, this->trdid, this->process->pid, name, local_cxy, inode, cycle );
    243251#endif
    244252 
     
    346354
    347355    // get size
    348     remote_rwlock_rd_lock( XPTR( cxy , &ptr->data_lock ) );
    349     uint32_t size = hal_remote_lw( XPTR( cxy , &ptr->size ) );
    350     remote_rwlock_rd_unlock( XPTR( cxy , &ptr->data_lock ) );
     356    remote_rwlock_rd_acquire( XPTR( cxy , &ptr->data_lock ) );
     357    uint32_t size = hal_remote_l32( XPTR( cxy , &ptr->size ) );
     358    remote_rwlock_rd_release( XPTR( cxy , &ptr->data_lock ) );
    351359    return size;
    352360}
     
    361369
    362370    // set size
    363     remote_rwlock_wr_unlock( XPTR( cxy , &ptr->data_lock ) );
    364     hal_remote_sw( XPTR( cxy , &ptr->size ) , size );
    365     remote_rwlock_wr_unlock( XPTR( cxy , &ptr->data_lock ) );
     371    remote_rwlock_wr_release( XPTR( cxy , &ptr->data_lock ) );
     372    hal_remote_s32( XPTR( cxy , &ptr->size ) , size );
     373    remote_rwlock_wr_release( XPTR( cxy , &ptr->data_lock ) );
    366374}
    367375
     
    374382
    375383    // release the main lock
    376     remote_spinlock_unlock( XPTR( cxy , &ptr->main_lock ) );
     384    remote_busylock_release( XPTR( cxy , &ptr->main_lock ) );
    377385}
    378386
     
    385393
    386394    // get the main lock
    387     remote_spinlock_lock( XPTR( cxy , &ptr->main_lock ) );
     395    remote_busylock_acquire( XPTR( cxy , &ptr->main_lock ) );
    388396}
    389397
     
    403411
    404412    // get parent dentry
    405     dentry_xp  = hal_remote_lwd( XPTR( inode_cxy , &inode_ptr->parent_xp ) );
     413    dentry_xp  = hal_remote_l64( XPTR( inode_cxy , &inode_ptr->parent_xp ) );
    406414
    407415    // get local copy of name
     
    475483cycle = (uint32_t)hal_get_cycles();
    476484if( DEBUG_VFS_DENTRY_CREATE < cycle )
    477 printk("\n[DBG] %s : dentry initialised\n", __FUNCTION__ );
     485printk("\n[DBG] %s : thread %x in process %x / dentry <%s> initialised / cycle %d\n",
     486__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, dentry->name, cycle );
    478487#endif
    479488
     
    488497cycle = (uint32_t)hal_get_cycles();
    489498if( DEBUG_VFS_DENTRY_CREATE < cycle )
    490 printk("\n[DBG] %s : dentry registerd in htab\n", __FUNCTION__ );
     499printk("\n[DBG] %s : thread %x in process %x / dentry <%s> registered / cycle %d\n",
     500__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, dentry->name, cycle );
    491501#endif
    492502
     
    544554    vfs_file_t  * file;
    545555        kmem_req_t    req;
     556
     557#if DEBUG_VFS_FILE_CREATE
     558uint32_t cycle = (uint32_t)hal_get_cycles();
     559if( DEBUG_VFS_OPEN < cycle )
     560printk("\n[DBG] %s : thread %x in process %x enter for inode %x in cluster %x / cycle %d\n",
     561__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, inode, local_cxy, cycle );
     562#endif
    546563
    547564    // allocate memory for new file descriptor
     
    563580    file->mapper   = inode->mapper;
    564581
    565     remote_rwlock_init( XPTR( local_cxy , &file->lock ) );
     582    remote_rwlock_init( XPTR( local_cxy , &file->lock ), LOCK_VFS_FILE );
    566583
    567584    *file_xp = XPTR( local_cxy , file );
    568585
    569 #if DEBUG_VFS_OPEN
    570 uint32_t cycle = (uint32_t)hal_get_cycles();
     586#if DEBUG_VFS_FILE_CREATE
     587cycle = (uint32_t)hal_get_cycles();
    571588if( DEBUG_VFS_OPEN < cycle )
    572589printk("\n[DBG] %s : thread %x in process %x created file %x in cluster %x / cycle %d\n",
     
    729746
    730747    // get inode type from remote file descriptor
    731     inode_type = hal_remote_lw( XPTR( file_cxy , &file_ptr->type   ) );
     748    inode_type = hal_remote_l32( XPTR( file_cxy , &file_ptr->type   ) );
    732749   
    733750    assert( (inode_type == INODE_TYPE_FILE) ,
     
    735752
    736753    // get mapper pointer and file offset from file descriptor
    737     file_offset = hal_remote_lw( XPTR( file_cxy , &file_ptr->offset ) );
     754    file_offset = hal_remote_l32( XPTR( file_cxy , &file_ptr->offset ) );
    738755    mapper = (mapper_t *)hal_remote_lpt( XPTR( file_cxy , &file_ptr->mapper ) );
    739756
     
    784801
    785802    // get inode type from remote file descriptor
    786     inode_type = hal_remote_lw( XPTR( file_cxy , &file_ptr->type   ) );
     803    inode_type = hal_remote_l32( XPTR( file_cxy , &file_ptr->type   ) );
    787804   
    788805    // action depends on inode type
     
    790807    {
    791808        // get mapper pointer and file offset from file descriptor
    792         file_offset = hal_remote_lw( XPTR( file_cxy , &file_ptr->offset ) );
     809        file_offset = hal_remote_l32( XPTR( file_cxy , &file_ptr->offset ) );
    793810        mapper = (mapper_t *)hal_remote_lpt( XPTR( file_cxy , &file_ptr->mapper ) );
    794811
     
    848865
    849866    // take file descriptor lock
    850     remote_rwlock_wr_lock( lock_xp );
     867    remote_rwlock_wr_acquire( lock_xp );
    851868
    852869    if      ( whence == SEEK_CUR )   // new = current + offset
    853870    {
    854         new = hal_remote_lw( offset_xp ) + offset;
     871        new = hal_remote_l32( offset_xp ) + offset;
    855872    }
    856873    else if ( whence == SEEK_SET )   // new = offset
     
    863880        inode_ptr = (vfs_inode_t *)hal_remote_lpt( XPTR( file_cxy , &file_ptr->inode ) );
    864881
    865         new = hal_remote_lw( XPTR( file_cxy , &inode_ptr->size ) ) + offset;
     882        new = hal_remote_l32( XPTR( file_cxy , &inode_ptr->size ) ) + offset;
    866883    }
    867884    else
    868885    {
    869886        printk("\n[ERROR] in %s : illegal whence value\n", __FUNCTION__ );
    870         remote_rwlock_wr_unlock( lock_xp );
     887        remote_rwlock_wr_release( lock_xp );
    871888        return -1;
    872889    }
    873890
    874891    // set new offset
    875     hal_remote_sw( offset_xp , new );
     892    hal_remote_s32( offset_xp , new );
    876893
    877894    // release file descriptor lock
    878     remote_rwlock_wr_unlock( lock_xp );
     895    remote_rwlock_wr_release( lock_xp );
    879896
    880897    // success
     
    929946
    930947    // take the lock protecting the list of copies
    931     remote_spinlock_lock( lock_xp );
     948    remote_queuelock_acquire( lock_xp );
    932949
    933950    XLIST_FOREACH( root_xp , iter_xp )
     
    948965        xptr_t entry_xp         = XPTR( process_cxy , &process_ptr->fd_array.array[file_id] );
    949966
    950 // remote_rwlock_wr_lock( fd_array_lock_xp );
    951 
    952         hal_remote_swd( entry_xp , XPTR_NULL );
     967// remote_rwlock_wr_acquire( fd_array_lock_xp );
     968
     969        hal_remote_s64( entry_xp , XPTR_NULL );
    953970       
    954 // remote_rwlock_wr_unlock( fd_array_lock_xp );
     971// remote_rwlock_wr_release( fd_array_lock_xp );
    955972
    956973        vfs_file_count_down( file_xp );
     
    960977
    961978    // release the lock protecting the list of copies
    962     remote_spinlock_unlock( lock_xp );
     979    remote_queuelock_release( lock_xp );
    963980
    964981#if (DEBUG_VFS_CLOSE & 1)
     
    10641081
    10651082    // get inode type from remote file
    1066     inode_type = hal_remote_lw( XPTR( inode_cxy , &inode_ptr->type ) );
     1083    inode_type = hal_remote_l32( XPTR( inode_cxy , &inode_ptr->type ) );
    10671084
    10681085    if( inode_type != INODE_TYPE_DIR )
     
    10721089    }
    10731090
    1074     assert( false , "not implemented\n" );
     1091    // TODO implement this function using process CWD lock
     1092
     1093assert( false , "not implemented\n" );
     1094
    10751095    return 0;
    10761096}
     
    11011121   
    11021122    // get inode type from remote inode
    1103     inode_type = hal_remote_lw( XPTR( inode_cxy , &inode_ptr->type ) );
     1123    inode_type = hal_remote_l32( XPTR( inode_cxy , &inode_ptr->type ) );
    11041124
    11051125   
     
    11231143//            Inode Tree functions
    11241144//////////////////////////////////////////////////////////////////////////////////////////
    1125 
    11261145
    11271146//////////////////////////////////////////////////////////////////////////
     
    11721191
    11731192    // get inode type
    1174     inode_type = hal_remote_lw( XPTR( inode_cxy , &inode_ptr->type ) );
     1193    inode_type = hal_remote_l32( XPTR( inode_cxy , &inode_ptr->type ) );
    11751194
    11761195    // get local pointer on associated mapper
     
    11921211
    11931212        // get xhtab lock
    1194         xhtab_read_lock( children_xp );
     1213        xhtab_lock( children_xp );
    11951214
    11961215        // get first dentry from xhtab
     
    12041223
    12051224            // get extended pointer on child inode
    1206             child_inode_xp = hal_remote_lwd( XPTR( child_dentry_cxy,
     1225            child_inode_xp = hal_remote_l64( XPTR( child_dentry_cxy,
    12071226                                                   &child_dentry_ptr->child_xp ) );
    12081227
     
    12101229            child_dentry_name_xp = XPTR( child_dentry_cxy , &child_dentry_ptr->name );
    12111230
    1212             // recursive call on child inode
     1231            // recursive call on inode display
    12131232            vfs_recursive_display( child_inode_xp,
    12141233                                   child_dentry_name_xp,
     
    12201239
    12211240        // release xhtab lock
    1222         xhtab_read_unlock( children_xp );
     1241        xhtab_unlock( children_xp );
    12231242    }
    12241243}  // end vfs_recursive_display()
     
    12311250    cxy_t          dentry_cxy;
    12321251    vfs_dentry_t * dentry_ptr;
    1233     uint32_t       save_sr;
    12341252
    12351253    // get target inode cluster and local pointer
     
    12381256
    12391257    // get extended pointer on associated dentry
    1240     dentry_xp   = hal_remote_lwd( XPTR( inode_cxy , &inode_ptr->parent_xp ) );
     1258    dentry_xp   = hal_remote_l64( XPTR( inode_cxy , &inode_ptr->parent_xp ) );
    12411259
    12421260    // check if target inode is the File System root
     
    12651283
    12661284    // get TXT0 lock in busy waiting mode
    1267     remote_spinlock_lock_busy( lock_xp , &save_sr );
     1285    remote_busylock_acquire( lock_xp );
    12681286
    12691287    // print header
     
    12741292
    12751293    // release lock
    1276     remote_spinlock_unlock_busy( lock_xp , save_sr );
     1294    remote_busylock_release( lock_xp );
    12771295
    12781296}  // end vfs_display()
     
    12981316
    12991317    // get inode access mode, UID, and GID
    1300     // TODO uint32_t  mode = hal_remote_lw( XPTR( inode_cxy , &inode_ptr->mode ) );
    1301     uid_t     uid  = hal_remote_lw( XPTR( inode_cxy , &inode_ptr->uid  ) );
    1302     gid_t     gid  = hal_remote_lw( XPTR( inode_cxy , &inode_ptr->gid  ) );
     1318    // TODO uint32_t  mode = hal_remote_l32( XPTR( inode_cxy , &inode_ptr->mode ) );
     1319    uid_t     uid  = hal_remote_l32( XPTR( inode_cxy , &inode_ptr->uid  ) );
     1320    gid_t     gid  = hal_remote_l32( XPTR( inode_cxy , &inode_ptr->gid  ) );
    13031321
    13041322    // FIXME : me must use mode
     
    13421360
    13431361    // return child inode
    1344     *child_xp = (xptr_t)hal_remote_lwd( XPTR( dentry_cxy , &dentry_ptr->child_xp ) );
     1362    *child_xp = (xptr_t)hal_remote_l64( XPTR( dentry_cxy , &dentry_ptr->child_xp ) );
    13451363    return true;
    13461364
     
    14961514            parent_ptr = GET_PTR( parent_xp );
    14971515            ctx_ptr    = (vfs_ctx_t *)hal_remote_lpt( XPTR( parent_cxy,&parent_ptr->ctx ) );
    1498             fs_type    = hal_remote_lw( XPTR( parent_cxy , &ctx_ptr->type ) );
     1516            fs_type    = hal_remote_l32( XPTR( parent_cxy , &ctx_ptr->type ) );
    14991517
    15001518            // select a cluster for missing inode
     
    15451563                if( last && create && dir )  // new directory  => update inode type
    15461564                {
    1547                      hal_remote_sw( XPTR( child_cxy, &child_ptr->type ), INODE_TYPE_DIR );
     1565                     hal_remote_s32( XPTR( child_cxy, &child_ptr->type ), INODE_TYPE_DIR );
    15481566
    15491567#if (DEBUG_VFS_LOOKUP & 1)
     
    15551573                else if ( last && create )   // new file => update inode type
    15561574                {
    1557                      hal_remote_sw( XPTR( child_cxy, &child_ptr->type ), INODE_TYPE_FILE );
     1575                     hal_remote_s32( XPTR( child_cxy, &child_ptr->type ), INODE_TYPE_FILE );
    15581576
    15591577#if (DEBUG_VFS_LOOKUP & 1)
     
    15741592            {
    15751593                // load child mapper from device if child is a directory (prefetch)
    1576                 if( hal_remote_lw( XPTR( child_cxy , &child_ptr->type ) ) == INODE_TYPE_DIR )
     1594                if( hal_remote_l32( XPTR( child_cxy , &child_ptr->type ) ) == INODE_TYPE_DIR )
    15771595                {
    15781596                    if( child_cxy == local_cxy )
     
    17001718
    17011719        // get extended pointer on parent dentry               
    1702         dentry_xp = (xptr_t)hal_remote_lwd( XPTR( inode_cxy , inode_ptr->parent_xp ) );
     1720        dentry_xp = (xptr_t)hal_remote_l64( XPTR( inode_cxy , inode_ptr->parent_xp ) );
    17031721
    17041722        // get dentry cluster and local pointer
     
    17071725
    17081726        // get dentry name length and pointer
    1709         length =  hal_remote_lw( XPTR( dentry_cxy , &dentry_ptr->length ) );
     1727        length =  hal_remote_l32( XPTR( dentry_cxy , &dentry_ptr->length ) );
    17101728        name   = (char *)hal_remote_lpt( XPTR( dentry_cxy , &dentry_ptr->name ) );
    17111729
     
    17271745
    17281746                // get extended pointer on next inode
    1729         inode_xp = (xptr_t)hal_remote_lwd( XPTR( dentry_cxy , dentry_ptr->parent ) );
     1747        inode_xp = (xptr_t)hal_remote_l64( XPTR( dentry_cxy , dentry_ptr->parent ) );
    17301748    }
    17311749    while( (dentry_xp != XPTR_NULL) );
     
    17571775#if DEBUG_VFS_ADD_CHILD
    17581776uint32_t cycle = (uint32_t)hal_get_cycles();
     1777thread_t * this = CURRENT_THREAD;
    17591778if( DEBUG_VFS_ADD_CHILD < cycle )
    1760 printk("\n[DBG] %s : thread %x enter for <%s> / child_cxy = %x / parent_cxy = %x / cycle %d\n",
    1761 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, name,
     1779printk("\n[DBG] %s : thread %x in process %x enter for <%s>\n"
     1780"      child_cxy = %x / parent_cxy = %x / cycle %d\n",
     1781__FUNCTION__, this->trdid, this->process->pid, name,
    17621782child_cxy, parent_cxy, (uint32_t)hal_get_cycles() );
    17631783#endif
     
    17701790                                   parent_ptr,
    17711791                                   &dentry_xp );
    1772 
    1773 #if (DEBUG_VFS_ADD_CHILD & 1)
    1774 if( (DEBUG_VFS_ADD_CHILD < cycle) && (error == 0) )
    1775 printk("\n[DBG] %s : dentry <%s> created in cluster %x\n", __FUNCTION__, name, local_cxy );
    1776 #endif
    1777 
    17781792    }
    17791793    else                               // parent cluster is remote
     
    17851799                                      &dentry_xp,
    17861800                                      &error );
    1787 
    1788 #if (DEBUG_VFS_ADD_CHILD & 1)
    1789 if( (DEBUG_VFS_ADD_CHILD < cycle) && (error == 0) )
    1790 printk("\n[DBG] %s : dentry <%s> created in cluster %x\n", __FUNCTION__, name, parent_cxy );
    1791 #endif
    1792 
    17931801    }
    17941802                                     
     
    17991807        return ENOMEM;
    18001808    }
     1809
     1810#if(DEBUG_VFS_ADD_CHILD & 1)
     1811if( DEBUG_VFS_ADD_CHILD < cycle )
     1812printk("\n[DBG] %s : thread %x in process %x / dentry <%s> created in cluster %x\n",
     1813__FUNCTION__, this->trdid, this->process->pid, name, parent_cxy );
     1814#endif
    18011815
    18021816    // 2. create child inode TODO : define attr / mode / uid / gid
     
    18171831                                  gid,
    18181832                                  &inode_xp );
    1819 
    1820 #if (DEBUG_VFS_ADD_CHILD & 1)
    1821 if( DEBUG_VFS_ADD_CHILD < cycle )
    1822 printk("\n[DBG] %s : inode <%x> created in cluster %x\n",
    1823 __FUNCTION__ , GET_PTR(inode_xp) , local_cxy );
    1824 #endif
    1825 
    18261833    }
    18271834    else                              // child cluster is remote
     
    18381845                                     &inode_xp,
    18391846                                     &error );
    1840 
    1841 #if (DEBUG_VFS_ADD_CHILD & 1)
    1842 if( DEBUG_VFS_ADD_CHILD < cycle )
    1843 printk("\n[DBG] %s : inode <%s> created in cluster %x\n",
    1844 __FUNCTION__ , GET_PTR(inode_xp) , child_cxy );
    1845 #endif
    1846 
    18471847    }
    18481848                                     
     
    18581858    }
    18591859
     1860#if(DEBUG_VFS_ADD_CHILD & 1)
     1861if( DEBUG_VFS_ADD_CHILD < cycle )
     1862printk("\n[DBG] %s : thread %x in process %x / inode <%s> created in cluster %x\n",
     1863__FUNCTION__ , this->trdid, this->process->pid, name , child_cxy );
     1864#endif
     1865
    18601866    // 3. update extended pointer on inode in dentry
    18611867    cxy_t          dentry_cxy = GET_CXY( dentry_xp );
    18621868    vfs_dentry_t * dentry_ptr = GET_PTR( dentry_xp );
    1863     hal_remote_swd( XPTR( dentry_cxy , &dentry_ptr->child_xp ) , inode_xp );
     1869    hal_remote_s64( XPTR( dentry_cxy , &dentry_ptr->child_xp ) , inode_xp );
    18641870
    18651871#if DEBUG_VFS_ADD_CHILD
    18661872cycle = (uint32_t)hal_get_cycles();
    18671873if( DEBUG_VFS_ADD_CHILD < cycle )
    1868 printk("\n[DBG] %s : thread %x in process %x exit for <%s>\n",
    1869 __FUNCTION__, CURRENT_THREAD, CURRENT_THREAD->process->pid, name );
     1874printk("\n[DBG] %s : thread %x in process %x exit for <%s> / cycle %d\n",
     1875__FUNCTION__, this->trdid, this->process->pid, name, (uint32_t)hal_get_cycles() );
    18701876#endif
    18711877
     
    18931899
    18941900    // get cluster and pointers of associated dentry
    1895     dentry_xp  = hal_remote_lwd( XPTR( inode_cxy , &inode_ptr->parent_xp ) );
     1901    dentry_xp  = hal_remote_l64( XPTR( inode_cxy , &inode_ptr->parent_xp ) );
    18961902    dentry_cxy = GET_CXY( dentry_xp );
    18971903    dentry_ptr = GET_PTR( dentry_xp );
     
    19581964    if( fs_type == FS_TYPE_FATFS )
    19591965    {
    1960         rwlock_wr_lock( &mapper->lock );
     1966        // enter mapper in write mode
     1967        rwlock_wr_acquire( &mapper->lock );
     1968
     1969        // move page to mapper
    19611970        error = fatfs_mapper_move_page( page , to_mapper );
    1962         rwlock_wr_unlock( &mapper->lock );
     1971
     1972        // exit mapper in write mode
     1973        rwlock_wr_release( &mapper->lock );
    19631974    }
    19641975    else if( fs_type == FS_TYPE_RAMFS )
Note: See TracChangeset for help on using the changeset viewer.