Changeset 614 for trunk/kernel/libk/user_dir.h
- Timestamp:
- Jan 15, 2019, 1:59:32 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/user_dir.h
r613 r614 70 70 * in the reference process descriptor. 71 71 ***************************************************************************************** 72 * @ ident : DIR virtual address, used as identifier.72 * @ ident : [in] DIR virtual address, used as identifier. 73 73 * @ returns extended pointer on user_dir_t if success / returns XPTR_NULL if not found. 74 74 ****************************************************************************************/ … … 77 77 /***************************************************************************************** 78 78 * 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. 80 82 * It must be executed by a thread running in the cluster containing the target inode. 81 83 * Use the RPC_USER_DIR_CREATE when the client thread is remote. 82 84 * 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. 84 86 * - the allocation of one or several physical pages in reference cluster to store 85 87 * all directory entries in an array of 64 bytes dirent structures, 86 88 * - 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 the88 * mapping of allrelevant 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. 89 91 * - the registration of the created user_dir_t structure in the xlist rooted 90 92 * in the reference process, 91 93 * It returns a local pointer on the created user_dir_t structure. 92 94 ***************************************************************************************** 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. 94 97 * @ return local pointer on user_dir_t if success / return XPTR_NULL if failure. 95 98 ****************************************************************************************/ 96 user_dir_t * user_dir_create( struct vfs_inode_s * inode ); 99 user_dir_t * user_dir_create( struct vfs_inode_s * inode, 100 xptr_t ref_xp ); 97 101 98 102 /***************************************************************************************** 99 103 * 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. 103 108 * It must be executed by a thread running in the cluster containing the target inode. 104 109 * Use the RPC_USER_DIR_DESTROY when the client thread is remote. 105 110 ***************************************************************************************** 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. 107 113 ****************************************************************************************/ 108 void user_dir_destroy( struct user_dir_s * dir ); 114 void user_dir_destroy( struct user_dir_s * dir, 115 xptr_t ref_xp ); 109 116 110 117
Note: See TracChangeset
for help on using the changeset viewer.