commit | d7f76fa1614667c4cacc1cffa17d86b3e3a5394d | [log] [tgz] |
---|---|---|
author | Wyatt Hepler <hepler@google.com> | Thu Jan 06 22:20:26 2022 -0800 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Jan 11 17:51:48 2022 +0000 |
tree | 554239d76d4ebd30ffba6609b0f0a63e51704dfb | |
parent | e4a0a67c425eec93c924d83edb446572f9ab4277 [diff] |
pw_{rpc, sync_stl}: Assert if STL mutex is misused - Update the pw_sync_stl mutex to track whether it is locked and assert if it's used improperly. The C++ standard states that unlocking an unlocked mutex is undefined behavior. Neither libc++ nor libstdc++ crash when a mutex is unlocked multiple times (at least on Linux). - Annotate the stub pw::rpc::internal::LockGuard class with thread safety annotations so that thread safety analysis applies when compiling without RPC locking. Change-Id: Ibcd77e90aedafaa5aa05016e9657f2b6983104a2 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/77504 Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com> Reviewed-by: Keir Mierle <keir@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.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/