[LAD] wanted: good online reading material for RT audio/midi software design?

James Morris james at jwm-art.net
Mon Mar 1 01:01:36 UTC 2010


On Thu, February 25, 2010 01:59, torbenh wrote:
> controllers modify your model.
> if your model has a bit of complexity, you cant share your model in a
> lockfree manner between the 2 views.
>
> so basically both views must own a copy of the model. and you need to
> figure out a way to apply controllers to both copies of the model.
>
> or use rcu techniques, to modify one copy of the model. and then do
> an atomic exchange.

so with a linked-list of data (the model) pointed to ptr1:
after every modification, make ptr2 point to a copy of the model

with every call of jack_process:
get the data pointed to by ptr2

(and it appears in the app that i'm looking at, undo functionality takes
care of how these copies are deleted).

so in the app that i'm looking at (i think i've simplified the process
slightly) the two pointers are marked volatile, and some comments talk
about swapping the comment back in atomically by making one pointer point
to the location pointed to by the other.

the pointer assignment is not atomic though is it?

how would you achieve this? (i recall a thread about this on LAD, i'll
look it up in a moment).

is the RCU implementation provided by the linux kernel of any use in
RT/JACK stuff?

cheers,
james.











More information about the Linux-audio-dev mailing list