pw_digital_io_linux: Update mock_vfs Back all MockFile objects by a real (kernel) eventfd. This does a few things: * It simplifies mock fd allocation by simply relying on the kernel fd allocation. * It avoids kFakeFdBase for "real" fd disambiguation. * It allows mock fds to be put into a real epoll instance, and subsequently waited upon for events (EPOLLIN only, currently). This correspondingly adds MockFile::WriteEventfd() and MockFile::ReadEventfd() methods for making the file readable and consuming its readable state, respectively. Finally, this adds MockVfs::mock_read() and corresponding MockFile::Read(). Change-Id: I80e3f87c20b1baf10370ac2cbd1d34b04f187b55 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/209594 Reviewed-by: Erik Gilling <konkers@google.com> Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> Commit-Queue: Jonathon Reinhart <jrreinhart@google.com> Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.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/.