Skip to content

Commit 1dbceed

Browse files
authored
Update recommendations for synchronization methods
added std::atomic
1 parent be264fb commit 1dbceed

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Background Info:
163163
- Use FreeRTOS mutexes, semaphores or queues when true concurrent access from multiple FreeRTOS tasks is possible, and race-conditions can lead to unexpected behaviour.
164164
- **Avoid `portENTER_CRITICAL()` / `portEXIT_CRITICAL()`**, as these functions stall the complete system and may cause LEDs flickering. Prefer FreeRTOS mutexes, semaphores or queues.
165165
- **Important**: Not every shared resource needs a mutex. Some synchronization is guaranteed by the overall control flow, for example when function calls are sequenced within the same loop iteration.
166-
- Consider RAII as an alternative to mutexes or semaphores.
166+
- Consider using `std::atomic` or RAII scoped guards as alternatives to mutexes, semaphores or queues.
167167

168168
## Web UI Code Style (wled00/data/)
169169

0 commit comments

Comments
 (0)