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

Diff for /pegasus/src/Pegasus/Common/ReadWriteSem.cpp between version 1.3 and 1.5

version 1.3, 2006/08/21 08:48:20 version 1.5, 2006/11/10 18:14:58
Line 55 
Line 55 
 ReadWriteSem::~ReadWriteSem() ReadWriteSem::~ReadWriteSem()
 { {
     int r=0;     int r=0;
     while (r=pthread_rwlock_destroy(&_rwlock.rwlock) == EBUSY || (r == -1 && errno == EBUSY))      while (r=pthread_rwlock_destroy(&_rwlock.rwlock) == EBUSY ||
              (r == -1 && errno == EBUSY))
     {     {
         Threads::yield();         Threads::yield();
     }     }
Line 207 
Line 208 
  
 int ReadWriteSem::read_count() const int ReadWriteSem::read_count() const
 { {
     return (_readers.get());      return _readers.get();
 } }
  
 int ReadWriteSem::write_count() const int ReadWriteSem::write_count() const
 { {
     return (_writers.get());      return _writers.get();
 } }
  
 #endif /* PEGASUS_USE_POSIX_RWLOCK */ #endif /* PEGASUS_USE_POSIX_RWLOCK */
Line 517 
Line 518 
         Threads::cleanup_pop(0);         Threads::cleanup_pop(0);
     }     }
  
     if (Threads::id(caught.get_owner()) != 0)      if (!Threads::null(caught.get_owner()))
         throw caught;         throw caught;
     if (Threads::id(caughtWaitFailed.get_owner()) != 0)      if (!Threads::null(caughtWaitFailed.get_owner()))
         throw caughtWaitFailed;         throw caughtWaitFailed;
     if (Threads::id(caughtTimeOut.get_owner()) != 0)      if (!Threads::null(caughtTimeOut.get_owner()))
         throw caughtTimeOut;         throw caughtTimeOut;
     if (Threads::id(caughtTooManyReaders.get_owner()) != 0)      if (!Threads::null(caughtTooManyReaders.get_owner()))
   
         throw caughtTooManyReaders;         throw caughtTooManyReaders;
     return;     return;
 } }
Line 556 
Line 558 
  
 int ReadWriteSem::read_count() const int ReadWriteSem::read_count() const
 { {
     return (_readers.get());      return _readers.get();
 } }
  
 int ReadWriteSem::write_count() const int ReadWriteSem::write_count() const
 { {
     return (_writers.get());      return _writers.get();
 } }
  
 #endif /* !PEGASUS_USE_SEMAPHORE_RWLOCK */ #endif /* !PEGASUS_USE_SEMAPHORE_RWLOCK */


Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2