diff options
| author | shaojinchun <[email protected]> | 2019-11-12 16:02:24 +0800 |
|---|---|---|
| committer | shaojinchun <[email protected]> | 2019-11-12 16:02:24 +0800 |
| commit | cdaf8c65cabd0120e6d19453cfffe905e9b6a769 (patch) | |
| tree | 6ed214fee8e085ee02d66f28a9e941a693354c29 | |
| parent | 939741991480f1e76e956d91b28f1dfc3fd6b9b9 (diff) | |
修正rt_thread_delete在特定点被切走后不能回来继续执行的问题
| -rw-r--r-- | src/thread.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/thread.c b/src/thread.c index a88729e52c..bee5f0c2c0 100644 --- a/src/thread.c +++ b/src/thread.c @@ -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)); |
