Merge pull request #3198 from jesven/fix_thread_delete

修正rt_thread_delete在特定点被切走后不能回来继续执行的问题
This commit is contained in:
Bernard Xiong 2019-11-12 20:24:04 +08:00 committed by GitHub
commit e8a864c7c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -446,12 +446,12 @@ rt_err_t rt_thread_delete(rt_thread_t thread)
/* release thread timer */
rt_timer_detach(&(thread->thread_timer));
/* change stat */
thread->stat = RT_THREAD_CLOSE;
/* disable interrupt */
lock = rt_hw_interrupt_disable();
/* change stat */
thread->stat = RT_THREAD_CLOSE;
/* insert to defunct thread list */
rt_list_insert_after(&rt_thread_defunct, &(thread->tlist));