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

Complete restructuration of kernel locks.

File:
1 edited

Legend:

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

    r506 r566  
    3535
    3636/////////////////////////////////
    37 int sys_chdir ( const char * pathname )
     37int sys_chdir ( char * pathname )
    3838{
    3939    error_t   error;
     
    4646    if( hal_strlen_from_uspace( pathname ) >= CONFIG_VFS_MAX_PATH_LENGTH )
    4747    {
    48         printk("\n[ERROR] in %s : pathname too long\n", __FUNCTION__ );
     48
     49#if DEBUG_SYSCALLS_ERROR
     50printk("\n[ERROR] in %s : pathname too long / thread %x in process %x\n",
     51__FUNCTION__, this->trdid, process->pid );
     52#endif
    4953        this->errno = ENFILE;
    5054        return -1;
     
    5458    hal_strcpy_from_uspace( kbuf , pathname , CONFIG_VFS_MAX_PATH_LENGTH );
    5559
     60    printk("\n[ERROR] in %s : not implemented yet\n", __FUNCTION__ );
     61    return -1;
     62
    5663    // get cluster and local pointer on reference process
    57     xptr_t      ref_xp  = process->ref_xp;
    58     process_t * ref_ptr = (process_t *)GET_PTR( ref_xp );
    59     cxy_t       ref_cxy = GET_CXY( ref_xp );
     64    // xptr_t      ref_xp  = process->ref_xp;
     65    // process_t * ref_ptr = (process_t *)GET_PTR( ref_xp );
     66    // cxy_t       ref_cxy = GET_CXY( ref_xp );
    6067
    6168    // get extended pointer on cwd lock in reference process
    62     xptr_t lock_xp = hal_remote_lwd( XPTR( ref_cxy , &ref_ptr->cwd_lock ) );
     69    // xptr_t lock_xp = hal_remote_l64( XPTR( ref_cxy , &ref_ptr->cwd_lock ) );
    6370
    6471    // get cwd lock in read mode
    65     remote_rwlock_rd_lock( lock_xp );
     72    // remote_rwlock_rd_acquire( lock_xp );
    6673
    67     // call relevant VFS function
    68     error = vfs_chdir( process->vfs_cwd_xp , kbuf );
     74    // TODO ce n'et pas au VFS de le faire [AG]
     75    // error = vfs_chdir( process->vfs_cwd_xp , kbuf );
    6976
    7077    // release cwd lock
    71     remote_rwlock_rd_unlock( lock_xp );
     78    // remote_rwlock_rd_release( lock_xp );
    7279
    7380    if( error )
Note: See TracChangeset for help on using the changeset viewer.