Changeset 457 for trunk/hal/generic/hal_context.h
- Timestamp:
- Aug 2, 2018, 11:47:13 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/generic/hal_context.h
r408 r457 43 43 * identified by the <thread> argument. The context is not initialised. 44 44 **************************************************************************************** 45 * @ thread : pointer on the thread descriptor. 45 46 * @ return 0 if success / return -1 if failure. 46 47 ***************************************************************************************/ … … 48 49 49 50 /**************************************************************************************** 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. 52 52 **************************************************************************************** 53 53 * @ thread : pointer on the thread descriptor. 54 * @ return 0 if success / return -1 if failure.55 54 ***************************************************************************************/ 56 error_t hal_cpu_context_create( struct thread_s * thread );55 void hal_cpu_context_init( struct thread_s * thread ); 57 56 58 57 /**************************************************************************************** … … 71 70 72 71 /**************************************************************************************** 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 ***************************************************************************************/ 79 void hal_cpu_context_exec( struct thread_s * thread ); 80 81 /**************************************************************************************** 73 82 * This function display some slots of the CPU context. 74 * - For the MIPS32 :75 * . GPR : gp_28 , sp_29 , ra_3176 * . CP0 : c0_sr , c0_th , c0_epc77 * . CP2 : c2_ptpr , c2-mode78 * - For X86 TODO :79 83 **************************************************************************************** 80 84 * @ thread_xp : extended pointer on the thread descriptor. … … 103 107 ***************************************************************************************/ 104 108 error_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 ***************************************************************************************/ 115 void hal_fpu_context_init( struct thread_s * thread ); 105 116 106 117 /****************************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.