Re: [LAD] easiest way to serialize messages for sending over a ringbuffer?

From: Nick Copeland <nickycopeland@email-addr-hidden>
Date: Wed Dec 14 2011 - 09:27:36 EET

> Thanks for the tips. What should one do if one detects a partial write? Is it best to have integrity checks on both ends of the ringbuffer?

Avoid them. There should be some calls for checkRingBufferWriteSpace(), make sure it is large enough to cater for your object size. You still have a few hoops and jumps to go through if the buffer is filling up but it is definitely going to be easier that catering for partial writes. Consider also logging messages when it is full and if it happens (too much or in my opinion at all) then look into why the reader is going too slow. If it is a general issue then you need to rearchitect what you are doing, if it is just a transient issue then bang more capacity on the ringbuffer.

Regards, nick.
                                               

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Wed Dec 14 12:15:02 2011

This archive was generated by hypermail 2.1.8 : Wed Dec 14 2011 - 12:15:02 EET