From e2b311c3b5f247300e96af76223808bbf1992720 Mon Sep 17 00:00:00 2001 From: heyuanjie87 <943313837@qq.com> Date: Thu, 29 Aug 2024 18:24:51 +0800 Subject: [PATCH] =?UTF-8?q?[kernel]=E5=9C=A8smart=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B9=9F=E5=90=AF=E7=94=A8"=E5=9B=9E=E6=94=B6=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit lwp的某些资源回收放到了后台,其中会引起线程挂起,而idle不应该被挂起 --- src/idle.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/idle.c b/src/idle.c index 0447de79b3..092b273783 100644 --- a/src/idle.c +++ b/src/idle.c @@ -50,7 +50,7 @@ static struct rt_thread idle_thread[_CPUS_NR]; rt_align(RT_ALIGN_SIZE) static rt_uint8_t idle_thread_stack[_CPUS_NR][IDLE_THREAD_STACK_SIZE]; -#ifdef RT_USING_SMP +#if defined(RT_USING_SMP) || defined(RT_USING_SMART) #ifndef SYSTEM_THREAD_STACK_SIZE #define SYSTEM_THREAD_STACK_SIZE IDLE_THREAD_STACK_SIZE #endif @@ -148,7 +148,7 @@ void rt_thread_defunct_enqueue(rt_thread_t thread) level = rt_spin_lock_irqsave(&_defunct_spinlock); rt_list_insert_after(&_rt_thread_defunct, &RT_THREAD_LIST_NODE(thread)); rt_spin_unlock_irqrestore(&_defunct_spinlock, level); -#ifdef RT_USING_SMP +#if defined(RT_USING_SMP) || defined(RT_USING_SMART) rt_sem_release(&system_sem); #endif } @@ -286,7 +286,7 @@ static void idle_thread_entry(void *parameter) } #endif /* RT_USING_IDLE_HOOK */ -#ifndef RT_USING_SMP +#if !defined(RT_USING_SMP) && !defined(RT_USING_SMART) rt_defunct_execute(); #endif /* RT_USING_SMP */ @@ -297,7 +297,7 @@ static void idle_thread_entry(void *parameter) } } -#ifdef RT_USING_SMP +#if defined(RT_USING_SMP) || defined(RT_USING_SMART) static void rt_thread_system_entry(void *parameter) { RT_UNUSED(parameter); @@ -355,7 +355,7 @@ void rt_thread_idle_init(void) rt_thread_startup(&idle_thread[i]); } -#ifdef RT_USING_SMP +#if defined(RT_USING_SMP) || defined(RT_USING_SMART) RT_ASSERT(RT_THREAD_PRIORITY_MAX > 2); rt_spin_lock_init(&_defunct_spinlock);