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

Diff for /pegasus/src/Pegasus/Common/Mutex.cpp between version 1.8 and 1.9

version 1.8, 2006/10/03 17:34:53 version 1.9, 2006/12/01 21:31:45
Line 210 
Line 210 
 static inline void _initialize(MutexRep& rep) static inline void _initialize(MutexRep& rep)
 { {
     rep.handle = CreateMutex(NULL, FALSE, NULL);     rep.handle = CreateMutex(NULL, FALSE, NULL);
 #if defined(PEGASUS_DEBUG)  
     rep.count = 0;     rep.count = 0;
 #endif  
 } }
  
 Mutex::Mutex() Mutex::Mutex()
Line 247 
Line 245 
     if (rc == WAIT_FAILED)     if (rc == WAIT_FAILED)
         throw WaitFailed(Threads::self());         throw WaitFailed(Threads::self());
  
 #if defined(PEGASUS_DEBUG)  
     _rep.count++;     _rep.count++;
 #endif  
 } }
  
 void Mutex::try_lock() void Mutex::try_lock()
Line 264 
Line 260 
     if (rc == WAIT_FAILED)     if (rc == WAIT_FAILED)
         throw WaitFailed(Threads::self());         throw WaitFailed(Threads::self());
  
 #if defined(PEGASUS_DEBUG)  
     _rep.count++;     _rep.count++;
 #endif  
 } }
  
 void Mutex::timed_lock(Uint32 milliseconds) void Mutex::timed_lock(Uint32 milliseconds)
Line 281 
Line 275 
     if (rc == WAIT_FAILED)     if (rc == WAIT_FAILED)
         throw WaitFailed(Threads::self());         throw WaitFailed(Threads::self());
  
 #if defined(PEGASUS_DEBUG)  
     _rep.count++;     _rep.count++;
 #endif  
 } }
  
 void Mutex::unlock() void Mutex::unlock()
Line 291 
Line 283 
     PEGASUS_DEBUG_ASSERT(_magic);     PEGASUS_DEBUG_ASSERT(_magic);
     PEGASUS_DEBUG_ASSERT(_rep.count > 0);     PEGASUS_DEBUG_ASSERT(_rep.count > 0);
  
 #if defined(PEGASUS_DEBUG)  
     _rep.count--;     _rep.count--;
 #endif  
     ReleaseMutex(_rep.handle);     ReleaseMutex(_rep.handle);
 } }
  


Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2