Changeset 709 for soft/giet_vm/giet_kernel/switch.s
- Timestamp:
- Oct 1, 2015, 4:20:46 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_kernel/switch.s
r301 r709 1 1 /****************************************************************************** 2 * This function receives two arguments that are the current t askcontext3 * (virtual) addresses and the next t askcontext (virtual) address.2 * This function receives two arguments that are the current thread context 3 * (virtual) addresses and the next thread context (virtual) address. 4 4 * 5 5 * This function should be called in a critical section … … 15 15 ******************************************************************************/ 16 16 17 .globl _t ask_switch18 .func _t ask_switch19 .type _t ask_switch, %function17 .globl _thread_switch 18 .func _thread_switch 19 .type _thread_switch, %function 20 20 21 _t ask_switch:21 _thread_switch: 22 22 23 /* save _current taskcontext */24 add $27, $4, $0 /* $27 <= &context[curr _task_id] */23 /* first step : save current thread context */ 24 add $27, $4, $0 /* $27 <= &context[current] */ 25 25 26 26 .set noat … … 70 70 sw $26, 39*4($27) /* ctx[35] <= PTPR */ 71 71 72 /* restore next taskcontext */73 add $27, $5, $0 /* $27<= &context[next _task_id] */72 /* second step : restore next thread context */ 73 add $27, $5, $0 /* $27<= &context[next] */ 74 74 75 75 .set noat … … 123 123 124 124 .endfunc 125 .size _t ask_switch, .-_task_switch125 .size _thread_switch, .-_thread_switch 126 126
Note: See TracChangeset
for help on using the changeset viewer.