Skip to content
Snippets Groups Projects
Commit 42d91ec0 authored by Marco De Marco's avatar Marco De Marco
Browse files

Counters readed without mutex lock fix

parent 230b949a
Branches
Tags
No related merge requests found
...@@ -436,6 +436,9 @@ void PreProcessor::read_RegularFileCounter(Tango::Attribute &attr) ...@@ -436,6 +436,9 @@ void PreProcessor::read_RegularFileCounter(Tango::Attribute &attr)
DEBUG_STREAM << "PreProcessor::read_RegularFileCounter(Tango::Attribute &attr) entering... " << endl; DEBUG_STREAM << "PreProcessor::read_RegularFileCounter(Tango::Attribute &attr) entering... " << endl;
/*----- PROTECTED REGION ID(PreProcessor::read_RegularFileCounter) ENABLED START -----*/ /*----- PROTECTED REGION ID(PreProcessor::read_RegularFileCounter) ENABLED START -----*/
// Set the attribute value // Set the attribute value
boost::mutex::scoped_lock regularCounterLock(m_regularCounterMutex);
attr.set_value(attr_RegularFileCounter_read); attr.set_value(attr_RegularFileCounter_read);
/*----- PROTECTED REGION END -----*/ // PreProcessor::read_RegularFileCounter /*----- PROTECTED REGION END -----*/ // PreProcessor::read_RegularFileCounter
...@@ -454,6 +457,9 @@ void PreProcessor::read_WarningFileCounter(Tango::Attribute &attr) ...@@ -454,6 +457,9 @@ void PreProcessor::read_WarningFileCounter(Tango::Attribute &attr)
DEBUG_STREAM << "PreProcessor::read_WarningFileCounter(Tango::Attribute &attr) entering... " << endl; DEBUG_STREAM << "PreProcessor::read_WarningFileCounter(Tango::Attribute &attr) entering... " << endl;
/*----- PROTECTED REGION ID(PreProcessor::read_WarningFileCounter) ENABLED START -----*/ /*----- PROTECTED REGION ID(PreProcessor::read_WarningFileCounter) ENABLED START -----*/
// Set the attribute value // Set the attribute value
boost::mutex::scoped_lock warningCounterLock(m_warningCounterMutex);
attr.set_value(attr_WarningFileCounter_read); attr.set_value(attr_WarningFileCounter_read);
/*----- PROTECTED REGION END -----*/ // PreProcessor::read_WarningFileCounter /*----- PROTECTED REGION END -----*/ // PreProcessor::read_WarningFileCounter
...@@ -472,6 +478,9 @@ void PreProcessor::read_ErrorFileCounter(Tango::Attribute &attr) ...@@ -472,6 +478,9 @@ void PreProcessor::read_ErrorFileCounter(Tango::Attribute &attr)
DEBUG_STREAM << "PreProcessor::read_ErrorFileCounter(Tango::Attribute &attr) entering... " << endl; DEBUG_STREAM << "PreProcessor::read_ErrorFileCounter(Tango::Attribute &attr) entering... " << endl;
/*----- PROTECTED REGION ID(PreProcessor::read_ErrorFileCounter) ENABLED START -----*/ /*----- PROTECTED REGION ID(PreProcessor::read_ErrorFileCounter) ENABLED START -----*/
// Set the attribute value // Set the attribute value
boost::mutex::scoped_lock errorCounterLock(m_errorCounterMutex);
attr.set_value(attr_ErrorFileCounter_read); attr.set_value(attr_ErrorFileCounter_read);
/*----- PROTECTED REGION END -----*/ // PreProcessor::read_ErrorFileCounter /*----- PROTECTED REGION END -----*/ // PreProcessor::read_ErrorFileCounter
...@@ -592,7 +601,7 @@ void PreProcessor::reset_counter() ...@@ -592,7 +601,7 @@ void PreProcessor::reset_counter()
//============================================================================== //==============================================================================
void PreProcessor::incrementRegularCounter() void PreProcessor::incrementRegularCounter()
{ {
DEBUG_STREAM << "FitsImporter::incrementRegularCounter() - " << device_name << endl; DEBUG_STREAM << "PreProcessor::incrementRegularCounter() - " << device_name << endl;
boost::mutex::scoped_lock regularCounterLock(m_regularCounterMutex); boost::mutex::scoped_lock regularCounterLock(m_regularCounterMutex);
...@@ -604,7 +613,7 @@ void PreProcessor::incrementRegularCounter() ...@@ -604,7 +613,7 @@ void PreProcessor::incrementRegularCounter()
//============================================================================== //==============================================================================
void PreProcessor::incrementWarningCounter() void PreProcessor::incrementWarningCounter()
{ {
DEBUG_STREAM << "FitsImporter::incrementWarningCounter() - " << device_name << endl; DEBUG_STREAM << "PreProcessor::incrementWarningCounter() - " << device_name << endl;
boost::mutex::scoped_lock warningCounterLock(m_warningCounterMutex); boost::mutex::scoped_lock warningCounterLock(m_warningCounterMutex);
...@@ -616,7 +625,7 @@ void PreProcessor::incrementWarningCounter() ...@@ -616,7 +625,7 @@ void PreProcessor::incrementWarningCounter()
//============================================================================== //==============================================================================
void PreProcessor::incrementErrorCounter() void PreProcessor::incrementErrorCounter()
{ {
DEBUG_STREAM << "FitsImporter::incrementErrorCounter() - " << device_name << endl; DEBUG_STREAM << "PreProcessor::incrementErrorCounter() - " << device_name << endl;
boost::mutex::scoped_lock errorCounterLock(m_errorCounterMutex); boost::mutex::scoped_lock errorCounterLock(m_errorCounterMutex);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment