[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] gr-buffer - threadsafe?
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] gr-buffer - threadsafe? |
Date: |
Fri, 2 Mar 2007 08:54:58 -0800 |
User-agent: |
Mutt/1.5.9i |
On Fri, Mar 02, 2007 at 02:22:50PM +0100, Dominik Auras wrote:
> Hi!
>
> Can I assume gr_buffer + gr_buffer_reader to be thread-safe?
>
> Regards
> Dominik
Hi Dominik,
It should be fine, though I don't think it's been tested in a
multi-threaded environment. It's single writer, multiple-reader, and
each piece of state has only a single modifier. It's basically a
variant on the standard lock-free ring buffer. On non-x86 machine
SMP machines (e.g. PPC) it may require the addition of memory barriers.
Eric