From b34360471571ea7346ab1c6cb87700a920ca5798 Mon Sep 17 00:00:00 2001
From: Tom Rondeau <trondeau@vt.edu>
Date: Sun, 21 Nov 2010 14:33:58 -0500
Subject: Fixing flowgraph dump to clean it up (via patch from eb). Also added
 note about mutex locking in prune_tags.

---
 gnuradio-core/src/lib/runtime/gr_buffer.cc | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'gnuradio-core/src/lib/runtime/gr_buffer.cc')

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;
-- 
cgit v1.2.3