@@ -256,10 +256,10 @@ void rt_hw_context_switch_interrupt(rt_ubase_t from, rt_ubase_t to, rt_thread_t
256256 rt_thread_switch_interrupt_flag = 1 ;
257257
258258 // set rt_interrupt_from_thread
259- rt_interrupt_from_thread = from ;
259+ rt_interrupt_from_thread = * (( rt_ubase_t * )( from )) ;
260260 }
261261
262- rt_interrupt_to_thread = to ;
262+ rt_interrupt_to_thread = * (( rt_ubase_t * )( to )) ;
263263
264264 //trigger YIELD exception(cause context switch)
265265 TriggerSimulateInterrupt (CPU_INTERRUPT_YIELD );
@@ -274,12 +274,12 @@ void rt_hw_context_switch(rt_ubase_t from, rt_ubase_t to)
274274 rt_thread_switch_interrupt_flag = 1 ;
275275
276276 // set rt_interrupt_from_thread
277- rt_interrupt_from_thread = from ;
277+ rt_interrupt_from_thread = * (( rt_ubase_t * )( from )) ;
278278
279279 }
280280
281281 // set rt_interrupt_to_thread
282- rt_interrupt_to_thread = to ;
282+ rt_interrupt_to_thread = * (( rt_ubase_t * )( to )) ;
283283
284284 //trigger YIELD exception(cause contex switch)
285285 TriggerSimulateInterrupt (CPU_INTERRUPT_YIELD );
@@ -312,7 +312,7 @@ void rt_hw_context_switch(rt_ubase_t from, rt_ubase_t to)
312312void rt_hw_context_switch_to (rt_ubase_t to )
313313{
314314 //set to thread
315- rt_interrupt_to_thread = to ;
315+ rt_interrupt_to_thread = * (( rt_ubase_t * )( to )) ;
316316
317317 //clear from thread
318318 rt_interrupt_from_thread = 0 ;
0 commit comments