const double DecodeSignal::DecodeThreshold = 0.2;
const int64_t DecodeSignal::DecodeChunkLength = 256 * 1024;
-mutex DecodeSignal::global_srd_mutex_;
-
DecodeSignal::DecodeSignal(pv::Session &session) :
SignalBase(nullptr, SignalBase::DecodeChannel),
do {
// Keep processing new samples until we exhaust the input data
do {
- // Prevent any other decode threads from accessing libsigrokdecode
- lock_guard<mutex> srd_lock(global_srd_mutex_);
-
- {
- lock_guard<mutex> input_lock(input_mutex_);
- sample_count = segment_->get_sample_count() - abs_start_samplenum;
- }
+ lock_guard<mutex> input_lock(input_mutex_);
+ sample_count = segment_->get_sample_count() - abs_start_samplenum;
if (sample_count > 0) {
decode_data(abs_start_samplenum, sample_count);
map<const decode::Row, decode::RowData> rows_;
map<pair<const srd_decoder*, int>, decode::Row> class_rows_;
- /**
- * This mutex prevents more than one thread from accessing
- * libsigrokdecode concurrently.
- * @todo A proper solution should be implemented to allow multiple
- * decode operations in parallel.
- */
- static mutex global_srd_mutex_;
-
mutable mutex input_mutex_, output_mutex_, logic_mux_mutex_;
mutable condition_variable decode_input_cond_, logic_mux_cond_;
bool frame_complete_;