Description
Currently, unsigned int (32-bit) integers are used for both a) LED flash triggering and b) HTTP/1.1 application server synchronization. While these are atomic by default on the CPU level, this does not protect against CPU instruction reordering. This reordering can occur under rare circumstances involving parallel RTOS tasks.
Fix
Wrap these variables in std::atomic and update the memory access (getters/setters) wherever these variables are read from or written to.
Description
Currently,
unsigned int(32-bit) integers are used for both a) LED flash triggering and b) HTTP/1.1 application server synchronization. While these are atomic by default on the CPU level, this does not protect against CPU instruction reordering. This reordering can occur under rare circumstances involving parallel RTOS tasks.Fix
Wrap these variables in
std::atomicand update the memory access (getters/setters) wherever these variables are read from or written to.