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 2023/08/03 17:16:47 UTC

[nuttx] branch master updated (ebaea6bd9f -> bfe962ce2c)

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

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


    from ebaea6bd9f sim: set loop thread priority to configurable
     new d313248a5b queue: add dq_inqueue & sq_inqueue support
     new bfe962ce2c pm: fix second time add wakelock dq caused error

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 drivers/power/pm/pm_activity.c | 2 +-
 include/nuttx/queue.h          | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)


[nuttx] 02/02: pm: fix second time add wakelock dq caused error

Posted by xi...@apache.org.
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/nuttx.git

commit bfe962ce2c7101eb9cdf7972b1a741c6a83cb9ce
Author: ligd <li...@xiaomi.com>
AuthorDate: Wed Jun 21 17:17:59 2023 +0800

    pm: fix second time add wakelock dq caused error
    
    Signed-off-by: ligd <li...@xiaomi.com>
---
 drivers/power/pm/pm_activity.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/pm/pm_activity.c b/drivers/power/pm/pm_activity.c
index ff6dab8adb..2c51bd05b9 100644
--- a/drivers/power/pm/pm_activity.c
+++ b/drivers/power/pm/pm_activity.c
@@ -66,7 +66,7 @@ static void pm_wakelock_stats(FAR struct pm_wakelock_s *wakelock, bool stay)
 
   if (stay)
     {
-      if (!wakelock->fsnode.blink && !wakelock->fsnode.flink)
+      if (!dq_inqueue(&wakelock->fsnode, &pdom->wakelockall))
         {
           dq_addlast(&wakelock->fsnode, &pdom->wakelockall);
         }


[nuttx] 01/02: queue: add dq_inqueue & sq_inqueue support

Posted by xi...@apache.org.
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/nuttx.git

commit d313248a5b316a339d072c43e891b3df59969c16
Author: ligd <li...@xiaomi.com>
AuthorDate: Sun Jun 25 11:15:47 2023 +0800

    queue: add dq_inqueue & sq_inqueue support
    
    Signed-off-by: ligd <li...@xiaomi.com>
---
 include/nuttx/queue.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/nuttx/queue.h b/include/nuttx/queue.h
index 80b2a04acd..02ee018f5d 100644
--- a/include/nuttx/queue.h
+++ b/include/nuttx/queue.h
@@ -264,6 +264,11 @@
 #define sq_tail(q)  ((q)->tail)
 #define dq_tail(q)  ((q)->tail)
 
+#define sq_inqueue(p, q) \
+      ((p)->flink || sq_tail(q) == (p))
+#define dq_inqueue(p, q) \
+      ((p)->flink || dq_tail(q) == (p))
+
 /****************************************************************************
  * Public Type Definitions
  ****************************************************************************/