Changeset 637 for trunk/hal/generic


Ignore:
Timestamp:
Jul 18, 2019, 2:06:55 PM (5 years ago)
Author:
alain
Message:

Introduce the non-standard pthread_parallel_create() system call
and re-write the <fft> and <sort> applications to improve the
intrinsic paralelism in applications.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/generic/hal_uspace.h

    r626 r637  
    3131//
    3232// When moving data between user space and kernel space, the user address is always
    33 // a virtual address, but the kernel address can be a physical address, on 32 bits
    34 // architectures, and require MMU dynamic activation/deactivation.
     33// a virtual address, but the kernel address is an extended pointer.
    3534// For sake of portability, user/kernel data transfers must use the following API.
    3635//////////////////////////////////////////////////////////////////////////////////////////
     
    4140 * that can be located in any cluster.
    4241 *****************************************************************************************
    43  * @ k_cxy     : cluster identifier for kernel destination buffer.
    44  * @ k_dst     : local pointer on kernel destination buffer.
    45  * @ u_src     : source buffer address in user space.
     42 * @ k_dst_xp  : extended pointer on kernel destination buffer.
     43 * @ u_src_ptr : source buffer address in user space.
    4644 * @ size      : size (number of bytes).
    4745 ****************************************************************************************/
    48 extern void hal_copy_from_uspace( cxy_t      k_cxy,
    49                                   void     * k_dst,
    50                                   void     * u_src,
     46extern void hal_copy_from_uspace( xptr_t     k_dst_xp,
     47                                  void     * u_src_ptr,
    5148                                  uint32_t   size );
    5249
     
    5552 * to a data buffer in the user space.
    5653 *****************************************************************************************
    57  * @ k_cxy     : cluster identifier for kernel source buffer.
    58  * @ k_src     : local pointer on kernel source buffer.
    59  * @ u_dst     : destination buffer address in user space.
     54 * @ u_dst_ptr : destination buffer address in user space.
     55 * @ k_src_xp  : extended pointer on kernel source buffer.
    6056 * @ size      : size (number of bytes).
    6157 ****************************************************************************************/
    62 extern void hal_copy_to_uspace( cxy_t      k_cxy,
    63                                 void     * k_src,
    64                                 void     * u_dst,
     58extern void hal_copy_to_uspace( void     * u_dst_ptr,
     59                                xptr_t     k_src_xp,
    6560                                uint32_t   size );
    6661
     
    6964 * The transfer stops after the first encountered NUL character, and no more than
    7065 * <max_size> characters are actually copied to target buffer.
    71  * If the kernel uses physical addresses, it activates the MMU to access the user buffer.
    7266 *****************************************************************************************
    73  * @ u_dst     : destination buffer address in user space.
    74  * @ k_src     : source address in kernel space.
     67 * @ k_dst_xp  : extended pointer on kernel destination buffer.
     68 * @ u_src_ptr : source address in user space.
    7569 * @ max_size  : max number of characters to be copied.
    7670 ****************************************************************************************/
    77 extern void hal_strcpy_from_uspace( char     * k_dst,
    78                                     char     * u_src,
     71extern void hal_strcpy_from_uspace( xptr_t     k_dst_xp,
     72                                    char     * u_src_ptr,
    7973                                    uint32_t   max_size );
    8074
     
    8377 * The transfer stops after the first encountered NUL character, and no more than
    8478 * <max_size> characters are actually copied to target buffer.
    85  * If the kernel uses physical addresses, it activates the MMU to access the user buffer.
    8679 *****************************************************************************************
    87  * @ u_dst    : destination buffer address in user space.
    88  * @ k_src     : source address in kernel space.
     80 * @ u_dst_ptr : destination buffer address in user space.
     81 * @ k_src_xp  : extended pointer on kernel source buffer.
    8982 * @ max_size  : max number of characters to be copied.
    9083 ****************************************************************************************/
    91 extern void hal_strcpy_to_uspace( char     * u_dst,
    92                                   char     * k_src,
     84extern void hal_strcpy_to_uspace( char     * u_dst_ptr,
     85                                  xptr_t     k_src_xp,
    9386                                  uint32_t   max_size );
    9487
    9588/*****************************************************************************************
    9689 * This function computes the length of a string in user space.
    97  * If the kernel uses physical addresses, it activates the MMU to access the user buffer.
    9890 *****************************************************************************************
    9991 * @ string     : string in user space.
Note: See TracChangeset for help on using the changeset viewer.