Ignore:
Timestamp:
Aug 2, 2018, 11:47:13 AM (4 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_switch.h

    r408 r457  
    2828
    2929/*************************************************************************************
    30  * The hal_do_cpu_switch() function is an assembly level function, called by the
    31  * sched_yield() function, to make a CPU context switch.
    32  * The current thread CPU context is identified by the <ctx_current> pointer.
    33  * The new thread CPU context is identified by the <ctx_next> pointer.
     30 * This assembly level function is called by the sched_yield() function,
     31 * to make a CPU context switch.
     32 * The current thread CPU context is identified by the <ctx_old> pointer.
     33 * The new thread CPU context is identified by the <ctx_new> pointer.
    3434 * The architecture specific hal_cpu_context_t structure used to store a CPU context
    3535 * is defined in the architecture specific hal_context.c file.
     
    4545
    4646/*************************************************************************************
    47  * The hal_do_cpu_save() function is an assembly level function, called by the
    48  * hal_cpu_context_save() functio to save the calling CPU register values to a
    49  * CPU context identified by the <ctx> pointer.
     47 * This assembly level function is called by the hal_cpu_context_fork() function.
     48 * It save the calling CPU register values to a CPU context identified by <ctx>.
    5049 * This function does NOT modify any register before saving values into context.
    5150 * The architecture specific hal_cpu_context_t structure used to store a CPU context
     
    5756void hal_do_cpu_save( void * ctx );
    5857
     58/*************************************************************************************
     59 * This assembly level function, is called by the hal_cpu_context_exec() function.
     60 * It restore the calling CPU register values from a CPU context identified by <ctx>.
     61 * The architecture specific hal_cpu_context_t structure used to store a CPU context
     62 * is defined in the architecture specific hal_context.c file.
     63 * When the restore is completed, it simply jumps to the address contained in ra_31.
     64 * In ALMOS-MKH, ra_31 must contain a pointer on the eret() function, and c0_epc
     65 * must contain the new main thread entry point.
     66 *************************************************************************************
     67 * @ ctx     : local pointer on CPU context.
     68 ************************************************************************************/
     69void hal_do_cpu_restore( void * ctx );
     70
    5971#endif  /* _HAL_SWITCH_H_ */
Note: See TracChangeset for help on using the changeset viewer.