Re: [LAD] easiest way to serialize messages for sending over a ringbuffer?

From: Paul Coccoli <pcoccoli@email-addr-hidden>
Date: Thu Dec 15 2011 - 00:27:39 EET

On Wed, Dec 14, 2011 at 4:54 PM, Paul Davis <paul@email-addr-hidden> wrote:
> On Wed, Dec 14, 2011 at 4:52 PM, Paul Coccoli <pcoccoli@email-addr-hidden> wrote:
>
>> Can you send a pointer to your struct over the ringbuffer instead?
>
> only if you establish very clear rules about buffer ownership. that
> can be tricky to do.

Agreed about the ownership rules, but I don't think it's that tricky.
Use one ringbuffer to pass pointer into the RT thread and another to
pass them back to the "main" (non-RT) thread. The non-RT thread is
then responsible for all memory management. You wouldn't call
free/delete in an RT thread anyway, would you?
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Thu Dec 15 00:15:03 2011

This archive was generated by hypermail 2.1.8 : Thu Dec 15 2011 - 00:15:03 EET