Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Or better question, what is preventing the realtime part from using half updated, thus invalid data anyway?

Data Half invalid realtime updated
0
Posted

Or better question, what is preventing the realtime part from using half updated, thus invalid data anyway?

0

The realtime/interrupt routine will access all the shared data via a single pointer that it reads from user-land at the start of the interrupt. The user-land code guarantees that at every single instant of time, this pointer is pointing to a fully valid and consistent data set …. it can guarantee this because it will never write into the data structure this pointer points to, only into the “other” data structure… and it updates the pointer to the “new” data structure only after it has completed all of its updates. And because we (hopefully!) can guarantee that the user-level code is not going to be running concurrently with the interrupt (i.e. the user-level code’s execution pauses whenever the interrupt starts, and starts again when the interrupt returns), the interrupt can be certain that the data it is reading will not change during the lifetime of the interrupt call.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123