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/11/16 12:03:46 UTC
[incubator-nuttx] branch master updated: sched/mqueue: make mqueue and mqueue sysv can disable separately
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 f27065cb9e sched/mqueue: make mqueue and mqueue sysv can disable separately
f27065cb9e is described below
commit f27065cb9e3ec41624fc56e950c98b8cfc1938a4
Author: zhangyuan21 <zh...@xiaomi.com>
AuthorDate: Wed Nov 16 18:20:31 2022 +0800
sched/mqueue: make mqueue and mqueue sysv can disable separately
---
fs/procfs/fs_procfsproc.c | 2 +-
fs/vfs/fs_stat.c | 2 +-
include/nuttx/sched.h | 2 +-
sched/Kconfig | 2 +-
sched/init/nx_start.c | 2 +-
sched/signal/sig_dispatch.c | 2 +-
sched/task/task_cancelpt.c | 2 +-
sched/task/task_recover.c | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/fs/procfs/fs_procfsproc.c b/fs/procfs/fs_procfsproc.c
index a93eb81148..801333e3f4 100644
--- a/fs/procfs/fs_procfsproc.c
+++ b/fs/procfs/fs_procfsproc.c
@@ -411,7 +411,7 @@ static FAR const char * const g_statenames[] =
"Inactive",
"Waiting,Semaphore",
"Waiting,Signal"
-#if !defined(CONFIG_DISABLE_MQUEUE) && !defined(CONFIG_DISABLE_MQUEUE_SYSV)
+#if !defined(CONFIG_DISABLE_MQUEUE) || !defined(CONFIG_DISABLE_MQUEUE_SYSV)
, "Waiting,MQ empty"
, "Waiting,MQ full"
#endif
diff --git a/fs/vfs/fs_stat.c b/fs/vfs/fs_stat.c
index bdaffe6862..aaa3dae383 100644
--- a/fs/vfs/fs_stat.c
+++ b/fs/vfs/fs_stat.c
@@ -269,7 +269,7 @@ int inode_stat(FAR struct inode *inode, FAR struct stat *buf, int resolve)
}
else
#endif
-#if !defined(CONFIG_DISABLE_MQUEUE) && !defined(CONFIG_DISABLE_MQUEUE_SYSV)
+#if !defined(CONFIG_DISABLE_MQUEUE) || !defined(CONFIG_DISABLE_MQUEUE_SYSV)
/* Check for a message queue */
if (INODE_IS_MQUEUE(inode))
diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h
index c2334d812a..c9f2455451 100644
--- a/include/nuttx/sched.h
+++ b/include/nuttx/sched.h
@@ -206,7 +206,7 @@ enum tstate_e
TSTATE_TASK_INACTIVE, /* BLOCKED - Initialized but not yet activated */
TSTATE_WAIT_SEM, /* BLOCKED - Waiting for a semaphore */
TSTATE_WAIT_SIG, /* BLOCKED - Waiting for a signal */
-#if !defined(CONFIG_DISABLE_MQUEUE) && !defined(CONFIG_DISABLE_MQUEUE_SYSV)
+#if !defined(CONFIG_DISABLE_MQUEUE) || !defined(CONFIG_DISABLE_MQUEUE_SYSV)
TSTATE_WAIT_MQNOTEMPTY, /* BLOCKED - Waiting for a MQ to become not empty. */
TSTATE_WAIT_MQNOTFULL, /* BLOCKED - Waiting for a MQ to become not full. */
#endif
diff --git a/sched/Kconfig b/sched/Kconfig
index 66c768b9de..75a956e47e 100644
--- a/sched/Kconfig
+++ b/sched/Kconfig
@@ -1586,7 +1586,7 @@ endmenu # Signal Numbers
endmenu # Signal Configuration
menu "Message Queue Options"
- depends on !DISABLE_MQUEUE && !DISABLE_MQUEUE_SYSV
+ depends on !DISABLE_MQUEUE || !DISABLE_MQUEUE_SYSV
config PREALLOC_MQ_MSGS
int "Number of pre-allocated messages"
diff --git a/sched/init/nx_start.c b/sched/init/nx_start.c
index e0139d594c..8262eb6c43 100644
--- a/sched/init/nx_start.c
+++ b/sched/init/nx_start.c
@@ -576,7 +576,7 @@ void nx_start(void)
nxsig_initialize();
-#if !defined(CONFIG_DISABLE_MQUEUE) && !defined(CONFIG_DISABLE_MQUEUE_SYSV)
+#if !defined(CONFIG_DISABLE_MQUEUE) || !defined(CONFIG_DISABLE_MQUEUE_SYSV)
/* Initialize the named message queue facility (if in link) */
nxmq_initialize();
diff --git a/sched/signal/sig_dispatch.c b/sched/signal/sig_dispatch.c
index 8a6d6719dd..b10337e4af 100644
--- a/sched/signal/sig_dispatch.c
+++ b/sched/signal/sig_dispatch.c
@@ -441,7 +441,7 @@ int nxsig_tcbdispatch(FAR struct tcb_s *stcb, siginfo_t *info)
nxsem_wait_irq(stcb, EINTR);
}
-#if !defined(CONFIG_DISABLE_MQUEUE) && !defined(CONFIG_DISABLE_MQUEUE_SYSV)
+#if !defined(CONFIG_DISABLE_MQUEUE) || !defined(CONFIG_DISABLE_MQUEUE_SYSV)
/* If the task is blocked waiting on a message queue, then that task
* must be unblocked when a signal is received.
*/
diff --git a/sched/task/task_cancelpt.c b/sched/task/task_cancelpt.c
index 2335235d2b..0c8609f474 100644
--- a/sched/task/task_cancelpt.c
+++ b/sched/task/task_cancelpt.c
@@ -392,7 +392,7 @@ bool nxnotify_cancellation(FAR struct tcb_s *tcb)
nxsig_wait_irq(tcb, ECANCELED);
}
-#if !defined(CONFIG_DISABLE_MQUEUE) && !defined(CONFIG_DISABLE_MQUEUE_SYSV)
+#if !defined(CONFIG_DISABLE_MQUEUE) || !defined(CONFIG_DISABLE_MQUEUE_SYSV)
/* If the thread is blocked waiting on a message queue, then
* the thread must be unblocked to handle the cancellation.
*/
diff --git a/sched/task/task_recover.c b/sched/task/task_recover.c
index e6365a42d4..85ed087a16 100644
--- a/sched/task/task_recover.c
+++ b/sched/task/task_recover.c
@@ -78,7 +78,7 @@ void nxtask_recover(FAR struct tcb_s *tcb)
nxsem_recover(tcb);
-#if !defined(CONFIG_DISABLE_MQUEUE) && !defined(CONFIG_DISABLE_MQUEUE_SYSV)
+#if !defined(CONFIG_DISABLE_MQUEUE) || !defined(CONFIG_DISABLE_MQUEUE_SYSV)
/* Handle cases where the thread was waiting for a message queue event */
nxmq_recover(tcb);