Ignore:
Timestamp:
Oct 4, 2018, 11:50:21 PM (3 years ago)
Author:
alain
Message:

Complete restructuration of kernel locks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/syscalls/sys_unlink.c

    r506 r566  
    3131
    3232//////////////////////////////////
    33 int sys_unlink ( const char * pathname )
     33int sys_unlink ( char * pathname )
    3434{
    3535    error_t   error;
     
    5555    cxy_t       ref_cxy = GET_CXY( ref_xp );
    5656
    57     // get the cwd lock in read mode from reference process
    58     remote_rwlock_rd_lock( XPTR( ref_cxy , &ref_ptr->cwd_lock ) );
     57    // get the cwd lock in write mode from reference process
     58    remote_rwlock_wr_acquire( XPTR( ref_cxy , &ref_ptr->cwd_lock ) );
    5959
    6060    // get extended pointer on cwd inode
    61     xptr_t cwd_xp = hal_remote_lwd( XPTR( ref_cxy , &ref_ptr->vfs_cwd_xp ) );
     61    xptr_t cwd_xp = hal_remote_l64( XPTR( ref_cxy , &ref_ptr->vfs_cwd_xp ) );
    6262
    6363    // call relevant VFS function
     
    6565
    6666    // release the cwd lock in reference process
    67     remote_rwlock_rd_unlock( XPTR( ref_cxy , &ref_ptr->cwd_lock ) );
     67    remote_rwlock_wr_release( XPTR( ref_cxy , &ref_ptr->cwd_lock ) );
    6868
    6969    if( error )
Note: See TracChangeset for help on using the changeset viewer.