diff options
author | Tom Rondeau | 2010-11-08 19:52:50 -0500 |
---|---|---|
committer | Tom Rondeau | 2010-11-08 19:52:50 -0500 |
commit | ab8c921bf73b61c19305bc0bf1fc4d26b110779e (patch) | |
tree | 7db1191c966c5cf75f4d3c77763bef99b2fd952d /gnuradio-core/src/lib/runtime/gr_buffer.cc | |
parent | 4cb301dec845778e468c73dac5eb04a9dfccb14a (diff) | |
download | gnuradio-ab8c921bf73b61c19305bc0bf1fc4d26b110779e.tar.gz gnuradio-ab8c921bf73b61c19305bc0bf1fc4d26b110779e.tar.bz2 gnuradio-ab8c921bf73b61c19305bc0bf1fc4d26b110779e.zip |
Adding mutex protection around adding and getting tags from buffers.
Diffstat (limited to 'gnuradio-core/src/lib/runtime/gr_buffer.cc')
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_buffer.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_buffer.cc b/gnuradio-core/src/lib/runtime/gr_buffer.cc index 862d92b81..1d67470ec 100644 --- a/gnuradio-core/src/lib/runtime/gr_buffer.cc +++ b/gnuradio-core/src/lib/runtime/gr_buffer.cc @@ -219,6 +219,7 @@ gr_buffer::drop_reader (gr_buffer_reader *reader) void gr_buffer::add_item_tag(const pmt::pmt_t &tag) { + gruel::scoped_lock guard(*mutex()); d_item_tags.push_back(tag); } @@ -267,6 +268,8 @@ std::vector<pmt::pmt_t> gr_buffer_reader::get_tags_in_range(uint64_t abs_start, uint64_t abs_end) { + gruel::scoped_lock guard(*mutex()); + std::vector<pmt::pmt_t> found_items; std::deque<pmt::pmt_t>::iterator itr = d_buffer->get_tags_begin(); |