pw_sync: add class InlineBorrowable InlineBorrowable owns an object and a mutex that guards the object. Both the object and mutex are constructed in-place, and the object can only be accessed by calling acquire() or one of the acquire_*() methods. InlineBorrowable should be used whenever an object needs to be guarded for its entire lifetime by a single mutex. InlineBorrowable extends Borrowable, so it can be passed to existing APIs by reference. Change-Id: Ib6f2a0471cf609af10524da7acc8a7de18f2874c Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/103180 Commit-Queue: Anton Markov <amarkov@google.com> Reviewed-by: 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/.