mirror of
https://github.com/supleed2/ELEC60013-ES-CW2.git
synced 2024-12-23 06:05:51 +00:00
Added new lines
This commit is contained in:
parent
3c8c3def94
commit
9bf12dcfae
|
@ -68,7 +68,7 @@ Shared data structures:
|
||||||
* msgInQ, handled by FreeRTOS
|
* msgInQ, handled by FreeRTOS
|
||||||
* code(RX_Message), handled by code(std::atomic_flag)
|
* code(RX_Message), handled by code(std::atomic_flag)
|
||||||
|
|
||||||
It was desiced to use C++ code(std::atomic), as it is easier to use and implement, while providing the same functionality as a mutex. According to the documentation: *"Each instantiation and full specialization of the std::atomic template defines an atomic type. If one thread writes to an atomic object while another thread reads from it, the behavior is well-defined (see memory model for details on data races). In addition, accesses to atomic objects may establish inter-thread synchronization and order non-atomic memory accesses as specified by std::memory_order."* (https://en.cppreference.com/w/cpp/atomic/atomic)
|
It was desiced to use C++ code(std::atomic), as it is easier to use and implement, while providing the same functionality as a mutex. According to the documentation: *"Each instantiation and full specialization of the std::atomic template defines an atomic type. If one thread writes to an atomic object while another thread reads from it, the behavior is well-defined (see memory model for details on data races). In addition, accesses to atomic objects may establish inter-thread synchronization and order non-atomic memory accesses as specified by std::memory_order.*"(https://en.cppreference.com/w/cpp/atomic/atomic)
|
||||||
|
|
||||||
TODO - Expand on the memory model for std::atomic.
|
TODO - Expand on the memory model for std::atomic.
|
||||||
TODO - Explain how FreeRTOS handles msgInQ.
|
TODO - Explain how FreeRTOS handles msgInQ.
|
||||||
|
|
Loading…
Reference in a new issue