TcMenu / TaskManagerIO

A task, event, scheduling, and interrupt marshalling library for Arduino and mbed boards.
Apache License 2.0
122 stars 12 forks source link

Move to using LDREX/STREX on STM32 instead of emulating atomic CAS #39

Open davetcc opened 2 years ago

davetcc commented 2 years ago

Catch up with mbed and ESP32 cases by using hardware CAS.

This is really only important for advanced multi-core users using an RTOS on Stm32Duino, at the moment the CAS instruction is emulated which is fine for all cases except where tasks were to be added from one core to another.

The code for this is available in SimpleCollections already where it handles writes to the circular buffer pointer. Once this has settled we'll use it in task manager too.