From cdaf8c65cabd0120e6d19453cfffe905e9b6a769 Mon Sep 17 00:00:00 2001 From: shaojinchun Date: Tue, 12 Nov 2019 16:02:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3rt=5Fthread=5Fdelete=E5=9C=A8?= =?UTF-8?q?=E7=89=B9=E5=AE=9A=E7=82=B9=E8=A2=AB=E5=88=87=E8=B5=B0=E5=90=8E?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E5=9B=9E=E6=9D=A5=E7=BB=A7=E7=BB=AD=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/thread.c | 6 +++--- 1 file 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)); -- GitLab