commit | 67e71ad7f7a3e8dfc63799d8ff241cd0a6daf9ee | [log] [tgz] |
---|---|---|
author | Anton Markov <amarkov@google.com> | Fri Sep 16 21:00:14 2022 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Sep 16 21:00:14 2022 +0000 |
tree | a328a725821dc13149227fb39bb770b28a659997 | |
parent | 25b197a80c5d3fa87f46c67f67e625a6d23a899b [diff] |
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/.