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

From: James Morris <james@email-addr-hidden-art.net>
Date: Mon Mar 01 2010 - 03:01:36 EET

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.

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Mon Mar 1 04:15:02 2010

This archive was generated by hypermail 2.1.8 : Mon Mar 01 2010 - 04:15:02 EET