[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Is it safe to modify input buffers in general_wor
From: |
Michael Dickens |
Subject: |
Re: [Discuss-gnuradio] Is it safe to modify input buffers in general_work()? |
Date: |
Fri, 09 Nov 2018 16:07:53 -0500 |
Depends on what you mean by "modify input buffers" ... You can read and write
to the buffers via the provided pointers. But the provided pointers do not
allow you to modify the actual gr::buffer in any way ... they just point to
where data is located. - MLD
On Fri, Nov 9, 2018, at 3:38 PM, rear1019 wrote:
> Hello,
>
> I would like to know whether it is safe to modify input buffers in
> general_work(). Looking at the documentation of gr::buffer [1] I
> strongly assume that the answer is no (“Single writer, multiple reader
> fifo.”).
>
> I have considered to check gr::buffer’s documentation only due to some
> knowledge of GNU Radio. I will add warnings to more obvious places
> (gr::block documentation/C++ tutorial) if my assumption is confirmed.
>
> [1] https://www.gnuradio.org/doc/doxygen/classgr_1_1buffer.html
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio