* switch to the first thread,it just call one time * * @author LXZ (2014/11/8) * * @param rt_uint32_t to */
| 182 | * @param rt_uint32_t to |
| 183 | */ |
| 184 | void rt_hw_context_switch_to(rt_uint32_t to) |
| 185 | { |
| 186 | |
| 187 | rt_interrupt_from_thread = 0; |
| 188 | rt_interrupt_to_thread = to; |
| 189 | rt_thread_switch_interrupt_flag = 1; |
| 190 | /* enable interrupt*/ |
| 191 | _IEN( _ICU_SWINT ) = 1; |
| 192 | |
| 193 | /*clear the interrupt flag*/ |
| 194 | _IR( _ICU_SWINT ) = 0; |
| 195 | _IPR( _ICU_SWINT ) = MAX_SYSCALL_INTERRUPT_PRIORITY + 1; |
| 196 | |
| 197 | /*touch the software interrupt*/ |
| 198 | ENTER_INTERRUPT(); |
| 199 | /*wait for first thread start up*/ |
| 200 | while(1); |
| 201 | } |
| 202 |
no outgoing calls
no test coverage detected