Repository navigation
mqueue: add poll support - #2957
Merged
Merged
Conversation
gustavonihei
reviewed
Mar 3, 2021
Change-Id: I7e908f6a6c00158c0946587dd79ae3dc5d279d37 Signed-off-by: ligd <[email protected]>
davids5
reviewed
Mar 4, 2021
davids5
left a comment
Contributor
There was a problem hiding this comment.
@GUIDINGLI - Nice Addition!
xiaoxiang781216
approved these changes
Mar 4, 2021
GUIDINGLI
pushed a commit
that referenced
this pull request
Nov 27, 2026
In fs/mqueue/Kconfig, CONFIG_FS_MQUEUE_NPOLLWAITERS currently defaults to 4, which was introduced when poll support was added in PR #2957. Each POSIX message queue pre-allocates an array of poll descriptors (FAR struct pollfd_s *fds[CONFIG_FS_MQUEUE_NPOLLWAITERS]) inside struct mqueue_inode_s. When mq_open() creates a queue, this structure is dynamically allocated from the heap. In typical embedded and RTOS applications, a message queue has at most one reader and one writer waiting concurrently on poll/select/epoll events. This change sets the default of CONFIG_FS_MQUEUE_NPOLLWAITERS to 2, aligning it with the rest of the IPC poll waiter configurations: CONFIG_SERIAL_NPOLLWAITERS=2 (PR #22228), CONFIG_DEV_PIPE_NPOLLWAITERS=2 (PR #22348), CONFIG_EVENT_FD_NPOLLWAITERS=2, CONFIG_TIMER_FD_NPOLLWAITERS=2, CONFIG_SIGNAL_FD_NPOLLWAITERS=2, and CONFIG_FS_NOTIFY_FD_POLLWAITERS=2. This saves 8 bytes of heap memory per message queue on 32-bit targets (16 bytes on 64-bit targets). Assisted-by: Claude:claude-opus-4.6 Signed-off-by: Swatantra Yadav <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mqueue: add poll support
Impact
mqeue, can support poll
Testing