You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ma...@apache.org on 2022/06/10 09:40:50 UTC
[incubator-nuttx] branch master updated: fs/mqueue: skip nxmq_pollnotify() if no poll waiters
This is an automated email from the ASF dual-hosted git repository.
masayuki 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 2fa7ebc18f fs/mqueue: skip nxmq_pollnotify() if no poll waiters
2fa7ebc18f is described below
commit 2fa7ebc18f35423881278684b2c74e3d2aa2d1a0
Author: chao.an <an...@xiaomi.com>
AuthorDate: Wed Jun 8 19:39:57 2022 +0800
fs/mqueue: skip nxmq_pollnotify() if no poll waiters
Signed-off-by: chao.an <an...@xiaomi.com>
---
fs/mqueue/mq_open.c | 2 ++
include/nuttx/mqueue.h | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/fs/mqueue/mq_open.c b/fs/mqueue/mq_open.c
index 1529e67160..6f421a3166 100644
--- a/fs/mqueue/mq_open.c
+++ b/fs/mqueue/mq_open.c
@@ -370,6 +370,7 @@ static mqd_t nxmq_vopen(FAR const char *mq_name, int oflags, va_list ap)
* Public Functions
****************************************************************************/
+#if CONFIG_FS_MQUEUE_NPOLLWAITERS > 0
void nxmq_pollnotify(FAR struct mqueue_inode_s *msgq, pollevent_t eventset)
{
int i;
@@ -395,6 +396,7 @@ void nxmq_pollnotify(FAR struct mqueue_inode_s *msgq, pollevent_t eventset)
}
}
}
+#endif
/****************************************************************************
* Name: file_mq_open
diff --git a/include/nuttx/mqueue.h b/include/nuttx/mqueue.h
index f834b31ce1..7ffe2d8d38 100644
--- a/include/nuttx/mqueue.h
+++ b/include/nuttx/mqueue.h
@@ -417,7 +417,11 @@ int nxmq_alloc_msgq(FAR struct mq_attr *attr,
*
****************************************************************************/
+#if CONFIG_FS_MQUEUE_NPOLLWAITERS > 0
void nxmq_pollnotify(FAR struct mqueue_inode_s *msgq, pollevent_t eventset);
+#else
+# define nxmq_pollnotify(msgq, eventset)
+#endif
/****************************************************************************
* Name: file_mq_open