Changeset 457 for trunk/hal/generic/hal_switch.h
- Timestamp:
- Aug 2, 2018, 11:47:13 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/generic/hal_switch.h
r408 r457 28 28 29 29 /************************************************************************************* 30 * Th e hal_do_cpu_switch() function is an assembly level function, called by the31 * 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_ne xt> 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. 34 34 * The architecture specific hal_cpu_context_t structure used to store a CPU context 35 35 * is defined in the architecture specific hal_context.c file. … … 45 45 46 46 /************************************************************************************* 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>. 50 49 * This function does NOT modify any register before saving values into context. 51 50 * The architecture specific hal_cpu_context_t structure used to store a CPU context … … 57 56 void hal_do_cpu_save( void * ctx ); 58 57 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 ************************************************************************************/ 69 void hal_do_cpu_restore( void * ctx ); 70 59 71 #endif /* _HAL_SWITCH_H_ */
Note: See TracChangeset
for help on using the changeset viewer.