Ignore:
Timestamp:
Jan 15, 2019, 1:59:32 PM (6 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/mm/mapper.h

    r612 r614  
    3838
    3939/*******************************************************************************************
    40  * The mapper implements 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.
    4141 * There is one mapper per file/dir. It is implemented as a three levels radix tree,
    4242 * entirely stored in the same cluster as the inode representing the file/dir.
     
    6363 *
    6464 * TODO : the mapper being only used to implement the VFS cache(s), the mapper.c
    65  *        and mapper.h file should beerro trandfered to the vfs directory.
     65 *        and mapper.h file should be trandfered to the vfs directory.
    6666 ******************************************************************************************/
    6767
     
    8585
    8686/*******************************************************************************************
    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 located
    89  * 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_s
    95 {
    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 /*******************************************************************************************
    10487 * This function allocates physical memory for a mapper descriptor, and initializes it
    10588 * (refcount <= 0) / inode <= NULL).
     
    158141 * returns O if success / returns -1 if error.
    159142 ******************************************************************************************/
    160 error_t mapper_move_user( xptr_t     mappe_xp,
     143error_t mapper_move_user( xptr_t     mapper_xp,
    161144                          bool_t     to_buffer,
    162145                          uint32_t   file_offset,
     
    258241 * @ page_id    : [in]  page index in file.
    259242 * @ nbytes     : [in]  value to be written.
    260  * @ string     : [in]  string printed in header.
    261243 * @ returns 0 if success / return -1 if error.
    262244 ******************************************************************************************/
    263245error_t mapper_display_page( xptr_t     mapper_xp,
    264246                             uint32_t   page_id,
    265                              uint32_t   nbytes,
    266                              char     * string );
     247                             uint32_t   nbytes );
    267248
    268249
Note: See TracChangeset for help on using the changeset viewer.