Changeset 408 for trunk/hal/generic/hal_switch.h
- Timestamp:
- Dec 5, 2017, 4:20:07 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/generic/hal_switch.h
r407 r408 46 46 /************************************************************************************* 47 47 * The hal_do_cpu_save() function is an assembly level function, called by the 48 * sys_fork() system call to save the parent thread register values to a child48 * hal_cpu_context_save() functio to save the calling CPU register values to a 49 49 * CPU context identified by the <ctx> pointer. 50 50 * This function does NOT modify any register before saving values into context. 51 51 * The architecture specific hal_cpu_context_t structure used to store a CPU context 52 52 * is defined in the architecture specific hal_context.c file. 53 * Two context slots are not saved from the calling thread registers values :54 * - the "current_thread" slot is set from the value defined by the <thread> argument.55 * - the "stack_pointer" slot is set by adding the value defined by the <offset>56 * argument to the current sp register value.57 53 * When the save is completed, it simply returns to the calling function. 58 54 ************************************************************************************* 59 * @ ctx : local pointer on target thread CPU context. 60 * @ thread : local pointer on target thread descriptor. 61 * @ offset : kernel stack pointer offset (&child - &parent). 55 * @ ctx : local pointer on CPU context. 62 56 ************************************************************************************/ 63 void hal_do_cpu_save( void * ctx, 64 void * thread, 65 int offset ); 57 void hal_do_cpu_save( void * ctx ); 66 58 67 59 #endif /* _HAL_SWITCH_H_ */
Note: See TracChangeset
for help on using the changeset viewer.