commit | 31e29acd07809b9cb267408ac3786f79e455710a | [log] [tgz] |
---|---|---|
author | RJ Ascani <rjascani@google.com> | Sat Dec 10 01:16:03 2022 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Sat Dec 10 01:16:03 2022 +0000 |
tree | 3bbb0845129fb527010ff503364dad13fb904012 | |
parent | f617f9e266812cf0ff58bcc693e097d19310ebcb [diff] |
pw_sync_freertos: Use ISL in ThreadNotification xTaskNotify can potentially yield if FreeRTOS is configured for pre-emption and the blocked thread is a higher priority than the notifying thread. This is particularly problematic for synchronous yielding ports, as we could potentially switch threads despite a defined critical section. In pwrev/119810, we enhance InterruptSpinLock to guard against this scenario by suspending the scheduler. This CL replaces the direct use of FreeRTOS critical sections within ThreadNotifications with a global InterruptSpinLock. This ensures that synchronous yielding ports will not reschedule when calling xTaskNotify. Bug: 255616165 Change-Id: I8462e10e62a6387a33dfe839af8b8a2a9b29cc0c Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/116071 Pigweed-Auto-Submit: RJ Ascani <rjascani@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/.