Fehler #666
Rinbuffer is not thread safe
Status:
Neu
Priorität:
Normal
Zugewiesen an:
-
Zielversion:
-
Beginn:
16.07.2025
Abgabedatum:
% erledigt:
0%
Geschätzter Aufwand:
CS Zielversion:
Beschreibung
Atomic access is required:
__atomic_add_fetch (&i1, 1, __ATOMIC_ACQ_REL);
The attached example can be used as unit test. A thread is filling the buffer, another thread is reading, data should be continuous.
Dateien