Changeset 679 for trunk/hal/generic


Ignore:
Timestamp:
Nov 20, 2020, 12:30:31 AM (4 years ago)
Author:
alain
Message:

Mainly cosmetic.

Location:
trunk/hal/generic
Files:
4 edited

Legend:

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

    r654 r679  
    22 * hal_context.h - Generic Thread Context Access API definition.
    33 *
    4  * Author  Alain Greiner    (2016,2017,2018,2019)
     4 * Author  Alain Greiner    (2016,2017,2018,2019,2020)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    5050/****************************************************************************************
    5151 * This function initializes the CPU context of the thread identified by the <thread>
    52  * argument. All slots required to start a new thread must be initialized.
     52 * argument from the <thread> descriptor, depending on the thread type (user / kernel).
     53 * All slots required to start a new thread must be initialized in the thread context.
     54 * Moreover, for an user thread, the arguments to be passed to the entry function
     55 * depend on the <is_main> argument below:
     56 * - a main thread, created by sys_exec(), requires two arguments, defined by the two
     57 *   <argc> and <argv> arguments below.
     58 *   define the arguments
     59 * - a pthread, created by sys_thread_create() requires only one argument, defined by
     60 *   the "entry_args" field in the thread descriptor.
    5361 ****************************************************************************************
    5462 * @ thread  : pointer on the thread descriptor.
     63 * @ is_main : main thread when non zero.
     64 * @ argc    : actual number of arguments (for main).
     65 * @ argv    : user space pointer on array of pointers on strings arguments (for main).
    5566 ***************************************************************************************/
    56 void hal_cpu_context_init( struct thread_s * thread );
     67void hal_cpu_context_init( struct thread_s * thread,
     68                           bool_t            is_main,
     69                           uint32_t          argc,
     70                           intptr_t          argv );
    5771
    5872/****************************************************************************************
     
    7589 ***************************************************************************************/
    7690void hal_cpu_context_fork( xptr_t    thread_xp );
    77 
    78 /****************************************************************************************
    79  * This function is used to implement the exec() system call.
    80  * 1) It initialize the relevant slots of the the calling thread CPU context.
    81  * 2) It call the hal_do_cpu_restore() function to return to user mode and start
    82  *    execution of the new process.
    83  ****************************************************************************************
    84  * @ thread  : pointer on the thread descriptor.
    85  ***************************************************************************************/
    86 void hal_cpu_context_exec( struct thread_s * thread );
    8791
    8892/****************************************************************************************
  • trunk/hal/generic/hal_special.h

    r625 r679  
    6666
    6767/*****************************************************************************************
    68  * This function returns the current value of the hardware cycles counter.
     68 * This low level function returns the current value of the hardware cycles counter.
    6969 * This cycle counter is reset when the core is initialised (at each boot).
    7070 ****************************************************************************************/
  • trunk/hal/generic/hal_uspace.h

    r658 r679  
    9595/*****************************************************************************************
    9696 * This function returns the length of a string located in user space.
     97 * This length does NOT include the terminating NUL character.
    9798 *****************************************************************************************
    98  * @ string     : string in user space.
     99 * @ string     : string pointer in user space.
    99100 * @ return length of the string.
    100101 ****************************************************************************************/
  • trunk/hal/generic/hal_vmm.h

    r635 r679  
    22 * hal_vmm.h - Kernel Virtual Memory Manager initialisation
    33 *
    4  * Authors  Alain Greiner (2016,2017,2018,2019)
     4 * Authors  Alain Greiner (2016,2017,2018,2019,2020)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
Note: See TracChangeset for help on using the changeset viewer.