Ignore:
Timestamp:
Nov 10, 2018, 3:06:00 PM (5 years ago)
Author:
alain
Message:

1) Modify the devfs_user_move() function to support large user buffer transfer to/from TXT device.
2) Cosmetic: Improve debug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/fs/devfs.h

    r568 r598  
    119119                       
    120120/******************************************************************************************
    121  * This function moves <size> bytes between a device, and a - possibly distributed -
    122  * user space <buffer>. It uses the <file_xp> and <to_buffer> arguments, to call the
    123  * relevant device access function.
    124  * It is called by the sys_read() and sys_write() functions.
    125  * The <size> argument cannot be larger than the CONFIG_TXT_KBUF_SIZE configuration
    126  * parameter, as this function makes a copy between the user space buffer, and a local
    127  * kernel buffer allocated in the kernel stack.
     121 * This function is called by the sys_read() and sys_write() functions.
     122 * It moves <size> bytes between a TXT device, and an user space <u_buf> buffer.
     123 * It uses the <file_xp> and <to_buffer> arguments, to call the relevant device function.
     124 * It uses a kernel buffer allocated in the calling thread kernel stack.
     125 * If the <size> argument is larger than CONFIG_TXT_KBUF_SIZE, the user buffer is split
     126 * in smaller chunks to be copied from the user buffer to this kernel buffer.
    128127 ******************************************************************************************
    129128 * @ to_buffer : device -> buffer if true / buffer -> device if false.
     
    135134int devfs_user_move( bool_t   to_buffer,
    136135                     xptr_t   file_xp,
    137                      void   * u_buf,
     136                     char   * u_buf,
    138137                     uint32_t size );
    139138
Note: See TracChangeset for help on using the changeset viewer.