fs/mqueue: skip nxmq_pollnotify() if no poll waiters

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an 2022-06-08 19:39:57 +08:00 committed by Masayuki Ishikawa
parent f5d4571abc
commit 2fa7ebc18f
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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