discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] gri_ringbuffer.{h,cc}


From: Frank Brickle
Subject: Re: [Discuss-gnuradio] gri_ringbuffer.{h,cc}
Date: Sun, 12 Mar 2006 22:50:21 -0500
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

Robert McGwier wrote:

There are subtle race conditions that might occur but they are minor irritants compared to the stupidity of what we were doing.

In particular you'd want to make sure any values that can be read in the callback are set atomically in the client code. That includes flags that trigger resets in the callback.

Bob's recounting of our joint mental blunder is a little oversimplified. My operating principle was that, once the callback is started, the ring buffers are *never* reset. This is correct in principle but unworkable in practice. Unfortunately the resets were kind of wedged into the code and not properly thought out, by me mostly.

The proper way to do this, of course, would be via something like an "around" method applied to the callback. Since that's not a possibility, the correct thing is still to wrap a ring buffer management layer around the jack buffer processing, but all inside the callback routine itself.

Frank




reply via email to

[Prev in Thread] Current Thread [Next in Thread]