Re: [LAD] Looking for an introduction to rt programming with a gui

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-audio-dev@...>
Date: Thursday, May 20, 2010 - 7:20 pm

On 05/20/2010 08:39 PM, Nathanael Anderson wrote:

Well, this is a bit different, but I made an osc server with liblo in Jackbeat,
and got no obscure issue IIRC.

But I sense that you are a bit afraid about dealing with multiple threads.

And in what you explain you'll still need an OSC thread in your daemon, which is
waiting for OSC messages and dispatches them when they arrive. So you'll have to
implement some kind of (IPC) communication channel between this thread and your
RT thread. GUI or not, you have to deal with this ;-)

Now, because you have an RT thread, there are some traditional IPC approaches
that you can't use here. You can't do any blocking calls in the RT thread, so
the usual mutex/lock-based IPC is not ok.

What I do in this situation is sending messages from one thread to the other
through a jack ringbuffer. This is 100% realtime-safe.

--
Olivier

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev

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

Messages in current thread:
[LAD] Looking for an introduction to rt programming with a gui, Nathanael Anderson, (Thu May 20, 1:14 pm)
Re: [LAD] Looking for an introduction to rt programming with..., Gabriel Beddingfield, (Thu May 20, 1:37 pm)
Re: [LAD] Looking for an introduction to rt programming with..., Olivier Guilyardi, (Sun May 23, 9:14 pm)
Re: [LAD] Looking for an introduction to rt programming with..., Jens M Andreasen, (Tue May 25, 12:05 am)
Re: [LAD] Looking for an introduction to rt programming with..., Nathanael Anderson, (Thu May 20, 6:39 pm)
Re: [LAD] Looking for an introduction to rt programming with..., Harry Van Haaren, (Fri May 21, 12:32 am)
Re: [LAD] Looking for an introduction to rt programming with..., Olivier Guilyardi, (Thu May 20, 7:20 pm)
Re: [LAD] Looking for an introduction to rt programming with..., Gabriel M. Beddingfield, (Thu May 20, 5:26 pm)
Re: [LAD] Looking for an introduction to rt programming with..., Gabriel M. Beddingfield, (Thu May 20, 8:09 pm)
Re: [LAD] Looking for an introduction to rt programming with..., Philipp √úberbacher, (Thu May 20, 2:32 pm)
Re: [LAD] Looking for an introduction to rt programming with..., Olivier Guilyardi, (Thu May 20, 4:30 pm)
Re: [LAD] Looking for an introduction to rt programming with..., Olivier Guilyardi, (Fri May 21, 9:52 am)