Changeset 614 for trunk/kernel/mm/mapper.h
- Timestamp:
- Jan 15, 2019, 1:59:32 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/mapper.h
r612 r614 38 38 39 39 /******************************************************************************************* 40 * Th e mapperimplements the kernel cache for a given VFS file or directory.40 * This mapper_t object implements the kernel cache for a given VFS file or directory. 41 41 * There is one mapper per file/dir. It is implemented as a three levels radix tree, 42 42 * entirely stored in the same cluster as the inode representing the file/dir. … … 63 63 * 64 64 * TODO : the mapper being only used to implement the VFS cache(s), the mapper.c 65 * and mapper.h file should be errotrandfered to the vfs directory.65 * and mapper.h file should be trandfered to the vfs directory. 66 66 ******************************************************************************************/ 67 67 … … 85 85 86 86 /******************************************************************************************* 87 * This structure defines a "fragment". It is used to move data between the kernel mapper,88 * and an user buffer, that can be split in several distributed physical pages located89 * in different clusters. A fragment is a set of contiguous bytes in the file.90 * - It can be stored in one single physical page in the user buffer.91 * - It can spread two successive physical pages in the kernel mapper.92 ******************************************************************************************/93 94 typedef struct fragment_s95 {96 uint32_t file_offset; /*! offset of fragment in file (i.e. in mapper) */97 uint32_t size; /*! number of bytes in fragment */98 cxy_t buf_cxy; /*! user buffer cluster identifier */99 void * buf_ptr; /*! local pointer on first byte in user buffer */100 }101 fragment_t;102 103 /*******************************************************************************************104 87 * This function allocates physical memory for a mapper descriptor, and initializes it 105 88 * (refcount <= 0) / inode <= NULL). … … 158 141 * returns O if success / returns -1 if error. 159 142 ******************************************************************************************/ 160 error_t mapper_move_user( xptr_t mappe _xp,143 error_t mapper_move_user( xptr_t mapper_xp, 161 144 bool_t to_buffer, 162 145 uint32_t file_offset, … … 258 241 * @ page_id : [in] page index in file. 259 242 * @ nbytes : [in] value to be written. 260 * @ string : [in] string printed in header.261 243 * @ returns 0 if success / return -1 if error. 262 244 ******************************************************************************************/ 263 245 error_t mapper_display_page( xptr_t mapper_xp, 264 246 uint32_t page_id, 265 uint32_t nbytes, 266 char * string ); 247 uint32_t nbytes ); 267 248 268 249
Note: See TracChangeset
for help on using the changeset viewer.