I see that the overwrite behavior could be advantageous in a narrow
range of situations where the reader gets behind but is able to catch up.

But even with x86 memory ordering, on SMP systems where the realtime and
free-running parts of sampler can run concurrently, it's possible for
the reader to get a half-updated sample, since there are multiple memory
operations to update that last sample if it consists of more than one
item.

But maybe that's a still more unlikely situation: not only does the
reader get behind, not only is it able to catch up, but in fact it can
consume the FIFO contents so quickly that it can get all the way from
full to racing the writer as it updates that last slot in the fifo.

This does point out that in my rewrite I should include a flags argument
so that we can add a flag for "write to full fifo overwrites last entry"
and we can make whatever caveat we need to about that last entry
possibly being only partially updated when it is consumed.

Jeff

------------------------------------------------------------------------------
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to