From 8da744a750a859213c66c29fcc618edde008866d Mon Sep 17 00:00:00 2001 From: "Man, Jianting (Meco)" <920369182@qq.com> Date: Mon, 8 Aug 2022 05:21:29 -0400 Subject: [PATCH] =?UTF-8?q?[exit]=20=E4=BF=AE=E5=A4=8D=5Fexit=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E6=9D=A1=E4=BB=B6=E5=88=86=E6=94=AF=E6=9C=AA=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E6=89=80=E6=9C=89=E6=83=85=E5=86=B5=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(#6239)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit attach #6229 --- components/libc/compilers/common/cstdlib.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/libc/compilers/common/cstdlib.c b/components/libc/compilers/common/cstdlib.c index 3ed5a228c8..55263011a9 100644 --- a/components/libc/compilers/common/cstdlib.c +++ b/components/libc/compilers/common/cstdlib.c @@ -20,16 +20,18 @@ void __rt_libc_exit(int status) if (self != RT_NULL) { + LOG_W("thread:%s exit:%d!", self->name, status); #ifdef RT_USING_PTHREADS if(self->pthread_data != RT_NULL) { extern void pthread_exit(void *value); pthread_exit((void *)status); } -#else - LOG_E("thread:%s exit:%d!", self->name, status); - rt_thread_control(self, RT_THREAD_CTRL_CLOSE, RT_NULL); + else #endif + { + rt_thread_control(self, RT_THREAD_CTRL_CLOSE, RT_NULL); + } } } -- GitLab