summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/runtime/gr_buffer.cc
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2010-11-21 14:33:58 -0500
committerTom Rondeau <trondeau@vt.edu>2010-11-21 14:33:58 -0500
commitb34360471571ea7346ab1c6cb87700a920ca5798 (patch)
tree77fa6b8d05cb1f2e3ebcefb08cf91b8f53e526fd /gnuradio-core/src/lib/runtime/gr_buffer.cc
parent8176675bcd887d760cc2413f9326d5515641d800 (diff)
Fixing flowgraph dump to clean it up (via patch from eb). Also added note about mutex locking in prune_tags.
Diffstat (limited to 'gnuradio-core/src/lib/runtime/gr_buffer.cc')
-rw-r--r--gnuradio-core/src/lib/runtime/gr_buffer.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_buffer.cc b/gnuradio-core/src/lib/runtime/gr_buffer.cc
index 1488e92f6b..0b2eb52a0d 100644
--- a/gnuradio-core/src/lib/runtime/gr_buffer.cc
+++ b/gnuradio-core/src/lib/runtime/gr_buffer.cc
@@ -231,6 +231,14 @@ gr_buffer::add_item_tag(const pmt::pmt_t &tag)
void
gr_buffer::prune_tags(uint64_t max_time)
{
+ /* NOTE: this function _should_ lock the mutex before editing
+ d_item_tags. In practice, this function is only called at
+ runtime by min_available_space in gr_block_executor.cc,
+ which locks the mutex itself.
+
+ If this function is used elsewhere, remember to lock the
+ buffer's mutex al la the scoped_lock line below.
+ */
//gruel::scoped_lock guard(*mutex());
int n = 0;