Ignore:
Timestamp:
Aug 2, 2018, 11:47:13 AM (3 years ago)
Author:
alain
Message:

This version modifies the exec syscall and fixes a large number of small bugs.
The version number has been updated (0.1)

File:
1 edited

Legend:

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

    r408 r457  
    4343 * identified by the <thread> argument. The context is not initialised.
    4444 ****************************************************************************************
     45 * @ thread  : pointer on the thread descriptor.
    4546 * @ return 0 if success / return -1 if failure.
    4647 ***************************************************************************************/
     
    4849
    4950/****************************************************************************************
    50  * This function allocates memory for a CPU context, initialize it from scratch,
    51  * and links it to the thread identified by the <thread> argument.
     51 * This function initializes a CPU context from scratch.
    5252 ****************************************************************************************
    5353 * @ thread  : pointer on the thread descriptor.
    54  * @ return 0 if success / return -1 if failure.
    5554 ***************************************************************************************/
    56 error_t hal_cpu_context_create( struct thread_s * thread );
     55void hal_cpu_context_init( struct thread_s * thread );
    5756
    5857/****************************************************************************************
     
    7170
    7271/****************************************************************************************
     72 * This function is used to implement the exec() system call.
     73 * 1) It initialize the relevant slots of the the calling thread CPU context.
     74 * 2) It call the hal_do_cpu_restore() function to return to user mode and start
     75 *    execution of the new process.
     76 ****************************************************************************************
     77 * @ thread  : pointer on the thread descriptor.
     78 ***************************************************************************************/
     79void hal_cpu_context_exec( struct thread_s * thread );
     80
     81/****************************************************************************************
    7382 * This function display some slots of the CPU context.
    74  * - For the MIPS32 :
    75  *   . GPR : gp_28 , sp_29 , ra_31
    76  *   . CP0 : c0_sr , c0_th , c0_epc
    77  *   . CP2 : c2_ptpr , c2-mode
    78  * - For X86 TODO :
    7983 ****************************************************************************************
    8084 * @ thread_xp  : extended pointer on the thread descriptor.
     
    103107 ***************************************************************************************/
    104108error_t hal_fpu_context_alloc( struct thread_s * thread );
     109
     110/****************************************************************************************
     111 * This function initializes a FPU context from scratch.
     112 ****************************************************************************************
     113 * @ thread  : pointer on the thread descriptor.
     114 ***************************************************************************************/
     115void hal_fpu_context_init( struct thread_s * thread );
    105116
    106117/****************************************************************************************
Note: See TracChangeset for help on using the changeset viewer.