Changeset 311 for trunk/hal/generic


Ignore:
Timestamp:
Aug 2, 2017, 2:17:00 PM (7 years ago)
Author:
max@…
Message:

Introduce hal_cpu_context_switch.

File:
1 edited

Legend:

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

    r296 r311  
    6969
    7070/****************************************************************************************
    71  * This function saves in the thread context the CPU registers values that must be
    72  * saved at context switch.
     71 * This function performs a context switch, saving the CPU register values into the
     72 * old thread, and initializing these registers with the values of the new thread.
    7373 ****************************************************************************************
    74  * @ ctx     : pointer on cpu context.
     74 * @ old     : pointer on current thread.
     75 * @ new     : pointer on the thread we want to switch to.
    7576 ***************************************************************************************/
    76 void hal_cpu_context_save( void * ctx );
    77 
    78 /****************************************************************************************
    79  * This function restores from the thread context the CPU registers values that must
    80  * be restored at context switch.
    81  ****************************************************************************************
    82  * @ ctx     : pointer on cpu context.
    83  ***************************************************************************************/
    84 void hal_cpu_context_restore( void * ctx );
     77void hal_cpu_context_switch( struct thread_s * old , struct thread_s * new );
    8578
    8679/****************************************************************************************
     
    9285 ***************************************************************************************/
    9386void hal_cpu_context_load( struct thread_s * thread );
    94 
    9587
    9688/****************************************************************************************
Note: See TracChangeset for help on using the changeset viewer.