diff options
author | Achilleas Anastasopoulos <anastas@umich.edu> | 2014-10-14 10:51:31 -0400 |
---|---|---|
committer | Achilleas Anastasopoulos <anastas@umich.edu> | 2014-10-15 19:01:05 -0400 |
commit | 79d55f173046d87ae31f04ad1e6dbafe1c9ae5ca (patch) | |
tree | c3efe8e25da8d13b99bb5cdf8b4234ef8cf54d07 /gr-trellis/lib/permutation_impl.cc | |
parent | be8e888f80934a884287f0ec9eb62dd0d2b7f5e5 (diff) |
fixed a bug in pccc encoder/decoder, and added fsm files.
Also added locks in the set_ methods
Diffstat (limited to 'gr-trellis/lib/permutation_impl.cc')
-rw-r--r-- | gr-trellis/lib/permutation_impl.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gr-trellis/lib/permutation_impl.cc b/gr-trellis/lib/permutation_impl.cc index 0d9d3593bf..2fe0ea8cb8 100644 --- a/gr-trellis/lib/permutation_impl.cc +++ b/gr-trellis/lib/permutation_impl.cc @@ -55,12 +55,20 @@ namespace gr { void permutation_impl::set_K(int K) { + gr::thread::scoped_lock guard(d_setlock); d_K=K; set_output_multiple(d_K*d_SYMS_PER_BLOCK); } + void permutation_impl::set_TABLE (const std::vector<int> &table) + { + gr::thread::scoped_lock guard(d_setlock); + d_TABLE = table; + } + void permutation_impl::set_SYMS_PER_BLOCK(int spb) { + gr::thread::scoped_lock guard(d_setlock); d_SYMS_PER_BLOCK=spb; set_output_multiple(d_K*d_SYMS_PER_BLOCK); } @@ -74,6 +82,7 @@ namespace gr { gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { + gr::thread::scoped_lock guard(d_setlock); int nstreams = input_items.size(); for(int m=0;m<nstreams;m++) { |