Re: [LAD] Best practice for sharing complex data structures with a jack callback function

From: Fons Adriaensen <fons@email-addr-hidden>
Date: Sat Jul 07 2007 - 12:25:12 EEST

On Fri, Jul 06, 2007 at 10:13:36PM -0500, Jack O'Quin wrote:

> Beware! Flags are not enough to guarantee that you get
> a coherent copy of the structure. The safest technique is
> using "guard" words at the start and end of the structure.
> ...

Depends on how they are used.

If the callback unconditionally updates the data each
time it runs then you are right.

If the system is that ownership of the struct is trans-
ferred between the two parties and only the owner ever
writes, then a simple flag will do.

Ciao,

-- 
FA
Follie! Follie! Delirio vano è questo !
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Received on Sat Jul 7 16:15:01 2007

This archive was generated by hypermail 2.1.8 : Sat Jul 07 2007 - 16:15:01 EEST