Ignore:
Timestamp:
Jan 9, 2019, 3:02:51 PM (5 years ago)
Author:
alain
Message:

Introduce sigificant modifs in VFS to support the <ls> command,
and the . and .. directories entries.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/mm/mapper.h

    r610 r611  
    11/*
    2  * mapper.h - Kernel cache for FS files or directories definition.
     2 * mapper.h - Kernel cache for VFS files/directories definition.
    33 *
    44 * Authors   Mohamed Lamine Karaoui (2015)
     
    195195
    196196/*******************************************************************************************
    197  * This function returns an extended pointer on a mapper page, identified by <page_id>,
    198  * index in the file. The - possibly remote - mapper is identified by the <mapper_xp>
    199  * argument.  It can be executed by a thread running in any cluster, as it uses remote
     197 * This function returns an extended pointer on a page descriptor.
     198 * The - possibly remote - mapper is identified by the <mapper_xp> argument.
     199 * The page is identified by <page_id> argument (page index in the file).
     200 * It can be executed by a thread running in any cluster, as it uses remote
    200201 * access primitives to scan the mapper.
    201202 * In case of miss, this function takes the mapper lock in WRITE_MODE, and call the
     
    205206 * @ mapper_xp  : extended pointer on the mapper.
    206207 * @ page_id    : page index in file
    207  * @ returns extended pointer on page base if success / return XPTR_NULL if error.
     208 * @ returns extended pointer on page descriptor if success / return XPTR_NULL if error.
    208209 ******************************************************************************************/
    209210xptr_t mapper_remote_get_page( xptr_t    mapper_xp,
     
    212213/*******************************************************************************************
    213214 * This function allows to read a single word in a mapper seen as and array of uint32_t.
    214  * It has bee designed to support remote access tho the FAT mapper of the FATFS.
     215 * It has bee designed to support remote access to the FAT mapper of the FATFS.
    215216 * It can be called by any thread running in any cluster.
    216217 * In case of miss, it takes the mapper lock in WRITE_MODE, load the missing
     
    218219 *******************************************************************************************
    219220 * @ mapper_xp  : [in]  extended pointer on the mapper.
    220  * @ index          : [in]  32 bits word index in file.
     221 * @ word_id    : [in]  32 bits word index in file.
    221222 * @ p_value    : [out] local pointer on destination buffer.
    222223 * @ returns 0 if success / return -1 if error.
     
    234235 *******************************************************************************************
    235236 * @ mapper_xp  : [in]  extended pointer on the mapper.
    236  * @ index          : [in]  32 bits word index in file.
    237  * @ p_value    : [in]  value to be written.
     237 * @ word_id    : [in]  32 bits word index in file.
     238 * @ value      : [in]  value to be written.
    238239 * @ returns 0 if success / return -1 if error.
    239240 ******************************************************************************************/
     
    242243                              uint32_t   value );
    243244
     245/*******************************************************************************************
     246 * This debug function displays the content of a given page of a given mapper.
     247 * - the mapper is identified by the <mapper_xp> argument.
     248 * - the page is identified by the <page_id> argument.
     249 * - the number of bytes to display in page is defined by the <nbytes> argument.
     250 * The format is eigth (32 bits) words per line in hexadecimal.
     251 * It can be called by any thread running in any cluster.
     252 * In case of miss in mapper, it load the missing page from device to mapper.
     253 *******************************************************************************************
     254 * @ mapper_xp  : [in]  extended pointer on the mapper.
     255 * @ page_id    : [in]  page index in file.
     256 * @ nbytes     : [in]  value to be written.
     257 * @ string     : [in]  string printed in header.
     258 * @ returns 0 if success / return -1 if error.
     259 ******************************************************************************************/
     260error_t mapper_display_page( xptr_t     mapper_xp,
     261                             uint32_t   page_id,
     262                             uint32_t   nbytes,
     263                             char     * string );
     264
     265
    244266#endif /* _MAPPER_H_ */
Note: See TracChangeset for help on using the changeset viewer.