Void Sentry
An AI-driven, real-time Sentry Turret platform leveraging asynchronous I/O and computer vision to deliver high-precision autonomous motion tracking on resource-constrained embedded hardware.
Loading...
Searching...
No Matches
sync.h File Reference

Small RAII wrappers for the two locking patterns the firmware uses (device only). More...

#include <freertos/FreeRTOS.h>
#include <freertos/portmacro.h>
#include <freertos/semphr.h>

Go to the source code of this file.

Classes

class  vsync::MutexLock
 Scoped lock on a FreeRTOS mutex; takes it forever on construction and gives it back on destruction. More...
 
class  vsync::SpinGuarded< T >
 A value of type T that owns its own spinlock; every access is one short critical section. More...
 

Detailed Description

Small RAII wrappers for the two locking patterns the firmware uses (device only).

MutexLock is for FreeRTOS mutexes held across longer work (never in an ISR). SpinGuarded is for short copy-only critical sections on a value shared between tasks (portENTER_CRITICAL, so no blocking calls, no logging and no allocation inside the callbacks). Both are task-context only: nothing here is ISR-safe, and no current user calls them from an ISR.