Firmware · RTOS: sharing safely
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.