commit | 238cb664a4ec6af4ab3b95b331a6692d2237a68b | [log] [tgz] |
---|---|---|
author | aarongreen <aarongreen@google.com> | Mon Aug 28 17:14:24 2023 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Aug 28 17:14:24 2023 +0000 |
tree | 192599f5d40afa0ebf0f5cee14020ffd6fd5ffdb | |
parent | 0c42501cb8ddb391a4e709d1b300304ecb96e1f1 [diff] |
pw_sync: Add GenericBasicLockable Lock types that derive from pw::sync::VirtualBasicLockable need to implement DoLockOperation() for the values of Operation::kLock and Operation::kUnlock. For most lock types, this translates to simply calling lock() or unlock() on the underlying lock instance, respectively. This CL deduplicates code from Mutex, TimedMutex, and InterruptSpinLock by providing a common implementation templated on the lock type. Change-Id: I962e329b47aeb50918ed5667520d0d3417fdb8ce Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/165930 Commit-Queue: Aaron Green <aarongreen@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/.