/* switch to the first thread,it just call one time */
void rt_hw_context_switch_to(rt_uint32_t to)
/* switch to the first thread,it just call one time */
void rt_hw_context_switch_to(rt_uint32_t to)
{
    rt_interrupt_from_thread = 0;
    rt_interrupt_to_thread = to;
    rt_thread_switch_interrupt_flag = 1;
    _IEN( _ICU_SWINT ) = 1;
    _IR( _ICU_SWINT ) = 0;
    _IPR( _ICU_SWINT ) = MAX_SYSCALL_INTERRUPT_PRIORITY + 1;
    ENTER_INTERRUPT();
    while(1);
}