commit | 754739c7d51cf2ddce914fb321eb16e037aa9ae6 | [log] [tgz] |
---|---|---|
author | Austin Foxley <afoxley@google.com> | Mon Oct 09 19:49:46 2023 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Oct 09 19:49:46 2023 +0000 |
tree | efe72de62fdf5999cf9d44e951faa9194deb8896 | |
parent | 0e403d6a58aaf54c811310d83e6da719e9658b9b [diff] |
pw_thread_freertos: Fix extra wakeups when detaching threads vTaskResume() is known to cause premature return from blocking APIs, since it will indiscriminately call prvAddTaskToReadyList(). Instead, use vTaskSuspendAll() / xTaskResumeAll(), which will not wake up any tasks which weren't already running (and weren't signalled during scheduler suspension). This also fixes a latent bug where, in the existing fallback case of using vTaskSuspendAll(), the new task scheduler state will be taskSCHEDULER_SUSPENDED, causing the subsequent xTaskResumeAll() to be skipped. Bug: b/303885539 Change-Id: I4d09400e133b4d44353d601d07e13917e096a3eb Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/175310 Reviewed-by: Ewout van Bekkum <ewout@google.com> Reviewed-by: Christoph Klee <chklee@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com> Pigweed-Auto-Submit: Austin Foxley <afoxley@google.com> Reviewed-by: Jonathon Reinhart <jrreinhart@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/.