You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/01/19 17:15:02 UTC

[incubator-nuttx] branch master updated: idle: remove heap & stack check in idle thread

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new dd08815  idle: remove heap & stack check in idle thread
dd08815 is described below

commit dd0881599141cf24d2e16ee0f6fc94aee51129fe
Author: ligd <li...@xiaomi.com>
AuthorDate: Wed Jan 19 00:33:36 2022 +0800

    idle: remove heap & stack check in idle thread
    
    Signed-off-by: ligd <li...@xiaomi.com>
---
 sched/semaphore/sem_holder.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sched/semaphore/sem_holder.c b/sched/semaphore/sem_holder.c
index e98f08d..1ee4906 100644
--- a/sched/semaphore/sem_holder.c
+++ b/sched/semaphore/sem_holder.c
@@ -942,12 +942,13 @@ void nxsem_add_holder_tcb(FAR struct tcb_s *htcb, FAR sem_t *sem)
 {
   FAR struct semholder_s *pholder;
 
-  /* If priority inheritance is disabled for this thread, then do not add
-   * the holder.  If there are never holders of the semaphore, the priority
+  /* If priority inheritance is disabled for this thread or it is IDLE hread,
+   * then do not add the holder.
+   * If there are never holders of the semaphore, the priority
    * inheritance is effectively disabled.
    */
 
-  if ((sem->flags & PRIOINHERIT_FLAGS_DISABLE) == 0)
+  if (htcb->flink != NULL && (sem->flags & PRIOINHERIT_FLAGS_DISABLE) == 0)
     {
       /* Find or allocate a container for this new holder */