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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <iainduncanlists@...>, <paul@...>
Cc: <linux-audio-dev@...>
Date: Wednesday, December 14, 2011 - 7:27 am

--_36c629e6-f22f-433c-aa52-9b54a00b8896_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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

Avoid them. There should be some calls for checkRingBufferWriteSpace()=2C =
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 d=
efinitely going to be easier that catering for partial writes. Consider als=
o logging messages when it is full and if it happens (too much or in my opi=
nion at all) then look into why the reader is going too slow. If it is a ge=
neral issue then you need to rearchitect what you are doing=2C if it is jus=
t a transient issue then bang more capacity on the ringbuffer.

Regards=2C nick.
=

--_36c629e6-f22f-433c-aa52-9b54a00b8896_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

&gt=3B 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.&nbsp=3B There should be =
some calls for checkRingBufferWriteSpace()=2C make sure it is large enough =
to cater for your object size. You still have a few hoops and jumps to go t=
hrough 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 w=
hy the reader is going too slow. If it is a general issue then you need to =
rearchitect what you are doing=2C if it is just a transient issue then bang=
more capacity on the ringbuffer.Regards=2C nick. =

=

--_36c629e6-f22f-433c-aa52-9b54a00b8896_--

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [LAD] easiest way to serialize messages for sending over..., Nick Copeland, (Wed Dec 14, 7:27 am)