commit | 2fed999cfb5afef7d220630c92345279774a9465 | [log] [tgz] |
---|---|---|
author | Ewout van Bekkum <ewout@google.com> | Tue Nov 23 11:49:02 2021 -0800 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Nov 23 21:17:23 2021 +0000 |
tree | dbf155c7aec090599b7c72c480e768794ce16faf | |
parent | 04965817fcb78ef988a810b0f8133b93f7fdeea1 [diff] |
pw_sync/interrupt_spin_lock: Optimize try_lock for uniprocesors Optimizes the existing backends for InterruptSpinLocks to implement try_lock through lock, given that the existing uniprocessor backends do not support SMP and ergo you cannot fail to acquire a lock. The only risk is that you recursively lock which is already guarded against by the lock implementation. Also updates the backends to consistently use debug asserts to guard against recursive locking. And lastly it disables some test behavior which relied on recursive locking which is undefined behavior. Change-Id: I991e56ab14df7efd2cd297b6dc2255ac318e4c0d Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/70528 Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.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/