commit | 62da50a4f4cb9b5082a09e3d2b86c3dcf691a261 | [log] [tgz] |
---|---|---|
author | Wyatt Hepler <hepler@google.com> | Fri Jun 28 22:55:12 2024 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Jun 28 22:55:12 2024 +0000 |
tree | f81d4ee24f5fbebda2cb5a3fa5af74a757eec998 | |
parent | 8b8ad3820dff2e6c5b7670bcd8355178b2d1b163 [diff] |
pw_async2_epoll: Use unordered_map; silence persistent warnings Rather than adding and removing read and write wakers to a vector, use an unordered_map that maps a file descriptor to read and write wakers. Also, silence unnecessary warning logs. Previously, epoll dispatcher frequently emitted these warnings: WRN Received an event for registered file descriptor 4, but there is no task to wake This warning would occur with every read. This is because epoll emits both EPOLLIN and EPOLLOUT events when reading from a read/write channel, resulting in unhandled write events, even though no tasks are trying to write. Retain the log as a debug-level log, and only trigger it if no tasks were waiting for either reads or writes. Change-Id: I241776d8d9f6cce01fbdf95babebd48bd5bd81fe Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/218860 Reviewed-by: Alexei Frolov <frolv@google.com> Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com> Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com> Commit-Queue: Wyatt Hepler <hepler@google.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.