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/04/17 03:38:42 UTC

[incubator-nuttx] branch master updated: semaphore: fix usage of NXSEM_INITIALIZER

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 ebffcdc992 semaphore: fix usage of NXSEM_INITIALIZER
ebffcdc992 is described below

commit ebffcdc992876d5bab8ff4f191171b6b088b0082
Author: Petro Karashchenko <pe...@gmail.com>
AuthorDate: Sun Apr 17 00:40:59 2022 +0200

    semaphore: fix usage of NXSEM_INITIALIZER
    
    Signed-off-by: Petro Karashchenko <pe...@gmail.com>
---
 fs/aio/aio_initialize.c     | 2 +-
 sched/wqueue/kwork_thread.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/aio/aio_initialize.c b/fs/aio/aio_initialize.c
index d238131406..968065a513 100644
--- a/fs/aio/aio_initialize.c
+++ b/fs/aio/aio_initialize.c
@@ -50,7 +50,7 @@ static dq_queue_t g_aioc_free;
 /* This counting semaphore tracks the number of free AIO containers */
 
 static sem_t g_aioc_freesem = NXSEM_INITIALIZER(CONFIG_FS_NAIOC,
-                                                SEM_PRIO_NONE);
+                                                PRIOINHERIT_FLAGS_DISABLE);
 
 /* This binary semaphore supports exclusive access to the list of pending
  * asynchronous I/O.  g_aio_holder and a_aio_count support the reentrant
diff --git a/sched/wqueue/kwork_thread.c b/sched/wqueue/kwork_thread.c
index cb63a52747..706267d8ce 100644
--- a/sched/wqueue/kwork_thread.c
+++ b/sched/wqueue/kwork_thread.c
@@ -80,7 +80,7 @@
 struct hp_wqueue_s g_hpwork =
 {
   {},
-  NXSEM_INITIALIZER(0, SEM_PRIO_NONE),
+  NXSEM_INITIALIZER(0, PRIOINHERIT_FLAGS_DISABLE),
 };
 
 #endif /* CONFIG_SCHED_HPWORK */
@@ -91,7 +91,7 @@ struct hp_wqueue_s g_hpwork =
 struct lp_wqueue_s g_lpwork =
 {
   {},
-  NXSEM_INITIALIZER(0, SEM_PRIO_NONE),
+  NXSEM_INITIALIZER(0, PRIOINHERIT_FLAGS_DISABLE),
 };
 
 #endif /* CONFIG_SCHED_LPWORK */