Firmware · RTOS: sharing safely

Race conditions

When two tasks share a variable, a task switch at the wrong instant can silently lose an update, and such bugs are hard to reproduce.