staticvoidrt_thread_exit(void){structrt_thread*thread;registerrt_base_tlevel;/* get current thread */thread = rt_current_thread;/* disable interrupt */level = rt_hw_interrupt_disable();/* remove from schedule */rt_schedule_remove_thread(thread);/* change stat */thread->stat = RT_THREA...