(file) Return to ProviderManagerService.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / ProviderManagerService

Diff for /pegasus/src/Pegasus/ProviderManagerService/ProviderManagerService.cpp between version 1.51 and 1.52

version 1.51, 2012/12/19 14:23:42 version 1.52, 2013/04/01 06:28:54
Line 1134 
Line 1134 
         request);         request);
  
     providerManagerService->SendForget(asyncRequest);     providerManagerService->SendForget(asyncRequest);
   
   
   
   
 #ifdef PEGASUS_INDICATIONS_Q_THRESHOLD  
   
     // See Comments in config.mak asociated with  
     //  PEGASUS_INDICATIONS_Q_THRESHOLD  
     //  
     // if INDICATIONS_Q_STALL THRESHOLD is gt 0  
     // then if there are over INDICATIONS_Q_STALL_THRESHOLD  
     //           indications in the queue  
     //      then force this provider to sleep until the queue count  
     //      is lower than INDICATIONS_Q_RESUME_THRESHOLD  
   
 static Mutex   indicationThresholdReportedLock;  
 static Boolean indicationThresholdReported = false;  
   
 #define INDICATIONS_Q_STALL_THRESHOLD PEGASUS_INDICATIONS_Q_THRESHOLD  
 #define INDICATIONS_Q_RESUME_THRESHOLD \  
     (int)(PEGASUS_INDICATIONS_Q_THRESHOLD*.90)  
 #define INDICATIONS_Q_STALL_DURATION 250 // milli-seconds  
   
     MessageQueue* indicationsQueue =  
         MessageQueue::lookup(_indicationServiceQueueId);  
   
     if (((MessageQueueService *)indicationsQueue)->getIncomingCount() >  
             INDICATIONS_Q_STALL_THRESHOLD)  
     {  
         AutoMutex indicationThresholdReportedAutoMutex(  
             indicationThresholdReportedLock);  
         if (!indicationThresholdReported)  
         {  
             indicationThresholdReported = true;  
             indicationThresholdReportedAutoMutex.unlock();  
   
             // make log entry to record que max exceeded  
             Logger::put(  
                 Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION,  
                 "Indication generation stalled: maximum queue count ($0) "  
                     "exceeded.",  
                 INDICATIONS_Q_STALL_THRESHOLD);  
         }  
         else  
         {  
             indicationThresholdReportedAutoMutex.unlock();  
         }  
   
         while (((MessageQueueService *)indicationsQueue)->getIncomingCount() >  
                    INDICATIONS_Q_RESUME_THRESHOLD)  
         {  
             Threads::sleep(INDICATIONS_Q_STALL_DURATION);  
         }  
   
         AutoMutex indicationThresholdReportedAutoMutex1(  
             indicationThresholdReportedLock);  
   
         if (indicationThresholdReported)  
         {  
             indicationThresholdReported = false;  
             indicationThresholdReportedAutoMutex1.unlock();  
   
             Logger::put(  
                 Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION,  
                 "Indication generation resumed: current queue count = $0",  
                 ((MessageQueueService *)indicationsQueue)->getIncomingCount());  
   
         }  
         else  
         {  
             indicationThresholdReportedAutoMutex1.unlock();  
         }  
     }  
 #endif /* INDICATIONS_Q_STALL_THRESHOLD */  
   
 } }
  
 void ProviderManagerService::providerModuleGroupFailureCallback( void ProviderManagerService::providerModuleGroupFailureCallback(


Legend:
Removed from v.1.51  
changed lines
  Added in v.1.52

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2