[Top][All Lists]

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

Re: [Discuss-gnuradio] Gnuradio ring buffer code

From: Andrej Rode
Subject: Re: [Discuss-gnuradio] Gnuradio ring buffer code
Date: Sun, 20 Jan 2019 13:59:31 +0100

Hi Ben, 

> Could anyone help point me to the right part of the src, I've had an
> initial go but have been unable to find the specific parts of the
> code that handle the adding/taking of samples into the gnuradio ring
> buffer. I'm particularly interested to know what phtread scheduling
> is used if its different from the defaults and how mutexes are handled

Everything as fundamental as buffer setup can be found in
Specifically `buffer.cc` and `vmcircbuf.cc` contain code for setting ub
the circular buffer structure by mapping adjacent virtual memory to the
same physical memory. 

Every block output port holds one of these buffers with read/write
pointers indicating the position of producers & consumers. Essentially
the access to these buffers is "lockfree" in the sense that the
producer is only allowed to write items up to the curent position of the
next read pointer and the consumers are only allowed to read up to
the current position of the write pointer.


Attachment: pgp_YRf5Cb7c4.pgp
Description: OpenPGP digital signature

reply via email to

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