ME507 Utility Library
0.2.1
Mechatronics Course Support Software for ARM/Arduino/FreeRTOS
|
Data which can be shared between tasks in a thread-safe manner. More...
Go to the source code of this file.
Classes | |
class | Share< DataType > |
Class for data to be shared in a thread-safe manner between tasks. More... | |
Data which can be shared between tasks in a thread-safe manner.
This file contains a template class for data which is to be shared between tasks. The data must be protected against damage due to context switches, so it is protected by a mutex or by causing transfers to take place inside critical sections of code which are not interrupted. This version is known to work on STM32's and ESP32's only because the insertion and extraction operators <<
and >>
need specific functions to determine if they're running in ISR's or not.
TaskShare
, removed unused version that uses semaphores, renamed put()
and get()
Share
SHARE_
..._CRITICAL(x); added <<
and >>
operators put
params from references to copies get()
which return values