rokath / trice

🟢 super fast 🚀 and tiny 🐥 embedded device 𝘾 printf-like trace ✍ code, works also inside ⚡ interrupts ⚡ and real-time PC 💻 logging (trace ID visualization 👀)
MIT License
517 stars 46 forks source link

SingleTricesRingCount multi task protection on TriceTransfer function #486

Closed KammutierSpule closed 2 months ago

KammutierSpule commented 2 months ago

SingleTricesRingCount is protected by TRICE_ENTER_CRITICAL_SECTION but on TriceTransfer function, SingleTricesRingCount--; is not protected.

It could happen that the variable is accessed at same time.

Should this be guarded too?

rokath commented 2 months ago

Should this be guarded too?

YES! It is now part of the master branch. Thanks!