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

Diff for /pegasus/src/Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.cpp between version 1.35 and 1.35.2.2

version 1.35, 2006/07/11 18:39:35 version 1.35.2.2, 2006/07/28 20:50:01
Line 42 
Line 42 
 #include "CMPI_Version.h" #include "CMPI_Version.h"
  
 #include <Pegasus/Common/Constants.h> #include <Pegasus/Common/Constants.h>
   #include <Pegasus/Common/Time.h>
 #include <Pegasus/Common/Tracer.h> #include <Pegasus/Common/Tracer.h>
 #include <Pegasus/Common/PegasusVersion.h> #include <Pegasus/Common/PegasusVersion.h>
  
Line 66 
Line 67 
 Semaphore CMPILocalProviderManager::_pollingSem(0); Semaphore CMPILocalProviderManager::_pollingSem(0);
 AtomicInt CMPILocalProviderManager::_stopPolling(0); AtomicInt CMPILocalProviderManager::_stopPolling(0);
 Thread *CMPILocalProviderManager::_reaperThread = 0; Thread *CMPILocalProviderManager::_reaperThread = 0;
 List<CMPILocalProviderManager::cleanupThreadRecord,RecursiveMutex> CMPILocalProviderManager::_finishedThreadList;  List<CMPILocalProviderManager::cleanupThreadRecord,Mutex> CMPILocalProviderManager::_finishedThreadList;
 Mutex CMPILocalProviderManager::_reaperMutex(0);  Mutex CMPILocalProviderManager::_reaperMutex;
  
   CMPILocalProviderManager::CMPILocalProviderManager (void):   CMPILocalProviderManager::CMPILocalProviderManager (void):
 _idle_timeout (IDLE_LIMIT) _idle_timeout (IDLE_LIMIT)
Line 325 
Line 326 
             try             try
             {             {
               struct timeval now;               struct timeval now;
               gettimeofday (&now, NULL);                Time::gettimeofday (&now);
               ProviderTable::Iterator i = myself->_providers.start ();               ProviderTable::Iterator i = myself->_providers.start ();
  
               for (; i != 0; i++)               for (; i != 0; i++)
Line 448 
Line 449 
  * The reaper function polls out the threads from the global list (_finishedThreadList),  * The reaper function polls out the threads from the global list (_finishedThreadList),
  * joins them deletes them, and removes them from the CMPIProvider specific list.  * joins them deletes them, and removes them from the CMPIProvider specific list.
  */  */
 PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL CMPILocalProviderManager::_reaper(void *parm)  ThreadReturnType PEGASUS_THREAD_CDECL CMPILocalProviderManager::_reaper(void *parm)
 { {
   Thread *myself = reinterpret_cast<Thread *>(parm);   Thread *myself = reinterpret_cast<Thread *>(parm);
   do {   do {
Line 472 
Line 473 
                 }                 }
     }     }
   while (_stopPolling.get() == 0);   while (_stopPolling.get() == 0);
   myself->exit_self( (PEGASUS_THREAD_RETURN) 0);    myself->exit_self( (ThreadReturnType) 0);
   return (0);   return (0);
 } }
  /*  /*
Line 507 
Line 508 
       while ( (rtn = _reaperThread->run()) != PEGASUS_THREAD_OK)       while ( (rtn = _reaperThread->run()) != PEGASUS_THREAD_OK)
       {       {
                 if (rtn == PEGASUS_THREAD_INSUFFICIENT_RESOURCES)                 if (rtn == PEGASUS_THREAD_INSUFFICIENT_RESOURCES)
                         pegasus_yield();                          Threads::yield();
                 else                 else
             {             {
                         PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, \                         PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL2, \
Line 697 
Line 698 
  
   if (first.tv_sec == 0)   if (first.tv_sec == 0)
     {     {
       gettimeofday (&first, NULL);        Time::gettimeofday (&first);
     }     }
   gettimeofday (&now, NULL);    Time::gettimeofday (&now);
  
   if (((now.tv_sec - first.tv_sec) > IDLE_LIMIT) &&   if (((now.tv_sec - first.tv_sec) > IDLE_LIMIT) &&
       ((now.tv_sec - last.tv_sec) > IDLE_LIMIT))       ((now.tv_sec - last.tv_sec) > IDLE_LIMIT))
     {     {
       gettimeofday (&last, NULL);        Time::gettimeofday (&last);
       PEG_TRACE_STRING (TRC_PROVIDERMANAGER, Tracer::LEVEL4,       PEG_TRACE_STRING (TRC_PROVIDERMANAGER, Tracer::LEVEL4,
                         "Checking for Idle providers to unload.");                         "Checking for Idle providers to unload.");
       try       try


Legend:
Removed from v.1.35  
changed lines
  Added in v.1.35.2.2

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2