Ignore:
Timestamp:
Dec 27, 2018, 7:38:58 PM (3 years ago)
Author:
alain
Message:

Fix several bugs in VFS to support the following
ksh commandis : cp, mv, rm, mkdir, cd, pwd

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/process.h

    r601 r610  
    125125        fd_array_t         fd_array;         /*! embedded open file descriptors array            */
    126126
    127         xptr_t             vfs_root_xp;      /*! extended pointer on current VFS root inode      */
     127        xptr_t             vfs_root_xp;      /*! extended pointer on VFS root inode              */
    128128        xptr_t             vfs_bin_xp;       /*! extended pointer on .elf file descriptor        */
    129129        pid_t              pid;              /*! process identifier                              */
     
    132132    xptr_t             parent_xp;        /*! extended pointer on parent process              */
    133133
    134         xptr_t             vfs_cwd_xp;       /*! extended pointer on current working dir inode   */
    135         remote_rwlock_t    cwd_lock;         /*! lock protecting working directory changes       */
     134        xptr_t             cwd_xp;           /*! extended pointer on current working dir inode   */
     135        remote_busylock_t  cwd_lock;         /*! lock protecting working directory changes       */
    136136
    137137        xlist_entry_t      children_root;    /*! root of the children process xlist              */
     
    338338 * It scan the list of local thread, and sets the THREAD_BLOCKED_GLOBAL bit for all threads.
    339339 * It request the relevant schedulers to acknowledge the blocking, using IPI if required,
    340  * and returns only when all threads in cluster, but the calling thread, are actually blocked.
     340 * when the target thread is running on another core than the calling thread.
     341 * It returns only when all threads in cluster, including the caller are actually blocked.
    341342 * The threads are not detached from the scheduler, and not detached from the local process.
    342343 *********************************************************************************************
     
    425426
    426427/*********************************************************************************************
    427  * This function allocates a free slot in the fd_array of the reference process,
    428  * register the <file_xp> argument in the allocated slot, and return the slot index.
     428 * This function allocates a free slot in the fd_array of the reference process
     429 * identified by the <process_xp> argument, register the <file_xp> argument in the
     430 * allocated slot, and return the slot index in the <fdid> buffer.
    429431 * It can be called by any thread in any cluster, because it uses portable remote access
    430432 * primitives to access the reference process descriptor.
    431433 * It takes the lock protecting the reference fd_array against concurrent accesses.
    432434 *********************************************************************************************
    433  * @ file_xp  : extended pointer on the file descriptor to be registered.
    434  * @ fdid     : [out] buffer for fd_array slot index.
     435 * @ process_xp : [in]  extended pointer on client reference process.
     436 * @ file_xp    : [in]  extended pointer on the file descriptor to be registered.
     437 * @ fdid       : [out] buffer for fd_array slot index.
    435438 * @ return 0 if success / return EMFILE if array full.
    436439 ********************************************************************************************/
    437 error_t process_fd_register( process_t * process,
     440error_t process_fd_register( xptr_t      process_xp,
    438441                             xptr_t      file_xp,
    439442                             uint32_t  * fdid );
     
    447450 * TODO this function is not implemented yet.
    448451 *********************************************************************************************
    449  * @ process  : pointer on the local process descriptor.
    450  * @ fdid     : file descriptor index in the fd_array.
     452 * @ process  : [in] pointer on the local process descriptor.
     453 * @ fdid     : [in] file descriptor index in the fd_array.
    451454 ********************************************************************************************/
    452455void process_fd_remove( process_t * process,
Note: See TracChangeset for help on using the changeset viewer.