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

Diff for /pegasus/src/Pegasus/Common/Semaphore.cpp between version 1.23 and 1.24

version 1.23, 2012/07/09 09:01:47 version 1.24, 2012/12/10 12:57:28
Line 126 
Line 126 
     // Acquire mutex to enter critical section.     // Acquire mutex to enter critical section.
     pthread_mutex_lock(&_rep.mutex);     pthread_mutex_lock(&_rep.mutex);
  
     // Push cleanup function onto cleanup stack  
     // The mutex will unlock if the thread is killed early  
 #if defined(PEGASUS_PLATFORM_AIX_RS_IBMCXX) \  
     || defined(PEGASUS_PLATFORM_PASE_ISERIES_IBMCXX)  
     Threads::cleanup_push(&semaphore_cleanup, &_rep);  
 #endif  
   
     // Keep track of the number of waiters so that <sema_post> works correctly.     // Keep track of the number of waiters so that <sema_post> works correctly.
     _rep.waiters++;     _rep.waiters++;
  
Line 154 
Line 147 
     // Since we push an unlock onto the cleanup stack     // Since we push an unlock onto the cleanup stack
     // We will pop it off to release the mutex when leaving the critical     // We will pop it off to release the mutex when leaving the critical
     // section.     // section.
 #if defined(PEGASUS_PLATFORM_AIX_RS_IBMCXX) \  
     || defined(PEGASUS_PLATFORM_PASE_ISERIES_IBMCXX)  
     Threads::cleanup_pop(1);  
 #endif  
     // Release mutex to leave critical section.     // Release mutex to leave critical section.
     pthread_mutex_unlock(&_rep.mutex);     pthread_mutex_unlock(&_rep.mutex);
 } }
Line 168 
Line 158 
     pthread_mutex_lock(&_rep.mutex);     pthread_mutex_lock(&_rep.mutex);
     Boolean timedOut = false;     Boolean timedOut = false;
  
 #if defined(PEGASUS_PLATFORM_AIX_RS_IBMCXX) \  
     || defined(PEGASUS_PLATFORM_PASE_ISERIES_IBMCXX)  
     // Push cleanup function onto cleanup stack  
     // The mutex will unlock if the thread is killed early  
     Threads::cleanup_push(&semaphore_cleanup, &_rep);  
 #endif  
   
     // Keep track of the number of waiters so that <sema_post> works correctly.     // Keep track of the number of waiters so that <sema_post> works correctly.
     _rep.waiters++;     _rep.waiters++;
  
Line 212 
Line 195 
     // Decrement the waiters count.     // Decrement the waiters count.
     _rep.waiters--;     _rep.waiters--;
  
 #if defined(PEGASUS_PLATFORM_AIX_RS_IBMCXX) \  
     || defined(PEGASUS_PLATFORM_PASE_ISERIES_IBMCXX)  
     // Since we push an unlock onto the cleanup stack  
     // We will pop it off to release the mutex when leaving the critical  
     // section.  
     Threads::cleanup_pop(1);  
 #endif  
   
     // Release mutex to leave critical section.     // Release mutex to leave critical section.
     pthread_mutex_unlock(&_rep.mutex);     pthread_mutex_unlock(&_rep.mutex);
  


Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2