[LAD] memory allocation for the real time thread, opinions wanted

Iain Duncan iainduncanlists at gmail.com
Wed Feb 29 18:24:55 UTC 2012


Thanks for all the comments everyone!
iain

On Tue, Feb 28, 2012 at 1:34 PM, Paul Coccoli <pcoccoli at gmail.com> wrote:

> On Mon, Feb 27, 2012 at 8:43 PM, James Morris <james at jwm-art.net> wrote:
> > On Mon, 27 Feb 2012 20:01:18 -0500
> > Paul Coccoli <pcoccoli at gmail.com> wrote:
> [Mass snippage]
> >> Why not just use 2 ringbuffers: one to send pointers to the RT thread,
> >> and a second to send them back to the low prio thread (so it can free
> >> them).  You probably need a semaphore for the return ringbuffer, but
> >> that should be RT-safe.
> >
> > That's what I thought... would be better for someone who is new to real
> > time threads and memory allocation... and is what I decided on... minus
> > the semaphore.
> >
> > So why is a semaphore needed? If the RT thread only sends an item back
> > when it absolutely no longer will use it?
>
> I suppose the semaphore isn't strictly necessary, but I think it's an
> easy way to tell the main thread that it has a message to process.
> Although one that probably doesn't integrate well with most
> main/non-RT threads.
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev at lists.linuxaudio.org
> http://lists.linuxaudio.org/listinfo/linux-audio-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20120229/1232c1b0/attachment.html>


More information about the Linux-audio-dev mailing list