diff options
author | Tim O'Shea | 2013-05-08 23:25:28 +0100 |
---|---|---|
committer | Tom Rondeau | 2013-05-08 19:16:01 -0400 |
commit | 3868a90728478e541d7b1b4864da1fbef59bcf34 (patch) | |
tree | bd67ff42e76ed5c92cf493e908f40d9bef7caaa1 /gnuradio-core/src/lib | |
parent | bad3b840f0408d18082de5fca8ae5804a751a30d (diff) | |
download | gnuradio-3868a90728478e541d7b1b4864da1fbef59bcf34.tar.gz gnuradio-3868a90728478e541d7b1b4864da1fbef59bcf34.tar.bz2 gnuradio-3868a90728478e541d7b1b4864da1fbef59bcf34.zip |
runtime: fix for thread safety issue during simultaneous use of stream tags and performance counters
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_block_detail.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_block_detail.cc b/gnuradio-core/src/lib/runtime/gr_block_detail.cc index af80e61cf..ecc0c1f98 100644 --- a/gnuradio-core/src/lib/runtime/gr_block_detail.cc +++ b/gnuradio-core/src/lib/runtime/gr_block_detail.cc @@ -261,6 +261,7 @@ gr_block_detail::stop_perf_counters(int noutput_items, int nproduced) d_var_input_buffers_full[i] = 0; } for(size_t i=0; i < d_output.size(); i++) { + gr::thread::scoped_lock guard(*d_output[i]->mutex()); float pfull = 1.0f - static_cast<float>(d_output[i]->space_available()) / static_cast<float>(d_output[i]->bufsize()); d_avg_output_buffers_full[i] = pfull; @@ -290,6 +291,7 @@ gr_block_detail::stop_perf_counters(int noutput_items, int nproduced) } for(size_t i=0; i < d_output.size(); i++) { + gr::thread::scoped_lock guard(*d_output[i]->mutex()); float pfull = 1.0f - static_cast<float>(d_output[i]->space_available()) / static_cast<float>(d_output[i]->bufsize()); |