
346 Embedded systems design
— or even a different one — can be used to send a message to warn
that filling must stop soon. By adding more pointers, it is possible
to not completely fill the area below the low water mark and then
use this to calculate the number of entries to move and thus the
next filling location.
This method has a problem in that there is a delay while the
data is copied. A more efficient alternative to copying the data, is
to copy the pointer. This approach works by still using the low
water mark, except that the remaining data is not copied. The
filling will start at the top of the buffer and the next data pointer
is moved to the top ...