Ignore:
Timestamp:
Jan 15, 2019, 1:59:32 PM (3 years ago)
Author:
alain
Message:

1) introduce a dev_ioc_sync_write() function in IOC API,

to improve the DEVFS synchronous update.

2) fix a big bug in both the user_dir_create() and user_dir_destroy()

functions: add an extended pointer on the reference client process
in the function's arguments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/libk/user_dir.h

    r613 r614  
    7070 * in the reference process descriptor.
    7171 *****************************************************************************************
    72  * @ ident    : DIR virtual address, used as identifier.
     72 * @ ident    : [in] DIR virtual address, used as identifier.
    7373 * @ returns extended pointer on user_dir_t if success / returns XPTR_NULL if not found.
    7474 ****************************************************************************************/
     
    7777/*****************************************************************************************
    7878 * This function allocates memory and initializes a user_dir_t structure in the cluster
    79  * containing the directory inode identified by the <inode> argument.
     79 * containing the directory inode identified by the <inode> argument and map the
     80 * user accessible dirent array in the reference user process VMM, identified by the
     81 * <ref_xp> argument.
    8082 * It must be executed by a thread running in the cluster containing the target inode.
    8183 * Use the RPC_USER_DIR_CREATE when the client thread is remote.
    8284 * It makes the following actions:
    83  * - the allocation of one user_dir_t descriptor in reference cluster.
     85 * - the allocation of one user_dir_t descriptor in the directory inode cluster.
    8486 * - the allocation of one or several physical pages in reference cluster to store
    8587 *   all directory entries in an array of 64 bytes dirent structures,
    8688 * - the initialisation of this array from informations found in the Inode Tree.
    87  * - the creation of an user accessible vseg containing this dirent array, and the
    88  *   mapping of all relevant physical pages in this vseg.
     89 * - the creation of an ANON vseg containing this dirent array in reference process VMM,
     90 *   and the mapping of the relevant physical pages in this vseg.
    8991 * - the registration of the created user_dir_t structure in the xlist rooted
    9092 *   in the reference process,
    9193 * It returns a local pointer on the created user_dir_t structure.
    9294 *****************************************************************************************
    93  * @ inode    : local pointer on the directory inode.
     95 * @ inode    : [in] local pointer on the directory inode.
     96 * @ ref_xp   : [in] extended pointer on the reference user process descriptor.
    9497 * @ return local pointer on user_dir_t if success / return XPTR_NULL if failure.
    9598 ****************************************************************************************/
    96 user_dir_t * user_dir_create( struct vfs_inode_s * inode );
     99user_dir_t * user_dir_create( struct vfs_inode_s * inode,
     100                              xptr_t               ref_xp );
    97101
    98102/*****************************************************************************************
    99103 * This function removes a user_dir_t structure from the xlist of user_dir_t
    100  * structures rooted in the reference process descriptor, and release all memory
    101  * allocated for the user_dir_t struct in the directory inode cluster,
    102  * including the dirent array.
     104 * structures rooted in the reference process descriptor, release all memory
     105 * allocated for the user_dir_t struct in the directory inode cluster, including
     106 * the dirent array, and delete all ANON vseg copies in all process VMM copies,
     107 * using parallel RPCs.
    103108 * It must be executed by a thread running in the cluster containing the target inode.
    104109 * Use the RPC_USER_DIR_DESTROY when the client thread is remote.
    105110 *****************************************************************************************
    106  * @ dir  : local pointer on user_dir_t structure.
     111 * @ dir      : [in] local pointer on user_dir_t structure.
     112 * @ ref_xp   : [in] extended pointer on the reference user process descriptor.
    107113 ****************************************************************************************/
    108 void user_dir_destroy( struct user_dir_s * dir );
     114void user_dir_destroy( struct user_dir_s * dir,
     115                       xptr_t              ref_xp );
    109116
    110117
Note: See TracChangeset for help on using the changeset viewer.