@@ -256,10 +256,10 @@ void rt_hw_context_switch_interrupt(rt_ubase_t from, rt_ubase_t to, rt_thread_t
256
256
rt_thread_switch_interrupt_flag = 1 ;
257
257
258
258
// set rt_interrupt_from_thread
259
- rt_interrupt_from_thread = from ;
259
+ rt_interrupt_from_thread = * (( rt_ubase_t * )( from )) ;
260
260
}
261
261
262
- rt_interrupt_to_thread = to ;
262
+ rt_interrupt_to_thread = * (( rt_ubase_t * )( to )) ;
263
263
264
264
//trigger YIELD exception(cause context switch)
265
265
TriggerSimulateInterrupt (CPU_INTERRUPT_YIELD );
@@ -274,12 +274,12 @@ void rt_hw_context_switch(rt_ubase_t from, rt_ubase_t to)
274
274
rt_thread_switch_interrupt_flag = 1 ;
275
275
276
276
// set rt_interrupt_from_thread
277
- rt_interrupt_from_thread = from ;
277
+ rt_interrupt_from_thread = * (( rt_ubase_t * )( from )) ;
278
278
279
279
}
280
280
281
281
// set rt_interrupt_to_thread
282
- rt_interrupt_to_thread = to ;
282
+ rt_interrupt_to_thread = * (( rt_ubase_t * )( to )) ;
283
283
284
284
//trigger YIELD exception(cause contex switch)
285
285
TriggerSimulateInterrupt (CPU_INTERRUPT_YIELD );
@@ -312,7 +312,7 @@ void rt_hw_context_switch(rt_ubase_t from, rt_ubase_t to)
312
312
void rt_hw_context_switch_to (rt_ubase_t to )
313
313
{
314
314
//set to thread
315
- rt_interrupt_to_thread = to ;
315
+ rt_interrupt_to_thread = * (( rt_ubase_t * )( to )) ;
316
316
317
317
//clear from thread
318
318
rt_interrupt_from_thread = 0 ;
0 commit comments