1 #ifndef __JLANG__JMUTEX__ 
    2 #define __JLANG__JMUTEX__ 
   12 namespace JSYNCHRONIZATION {}
 
   13 namespace JPP { 
using namespace JSYNCHRONIZATION; }
 
   15 namespace JSYNCHRONIZATION {
 
   46 template<
typename Lockable>
 
  103     pthread_mutex_init(&
m_mutex, 0);
 
  111     pthread_mutex_destroy(&
m_mutex);
 
  121     return pthread_mutex_lock(&
m_mutex);
 
  131     return pthread_mutex_trylock(&
m_mutex);
 
  141     return pthread_mutex_unlock(&
m_mutex);
 
  149 #endif // __JLANG__JMUTEX__ 
JBasicScopedLock< JMutex > JScopedLock
 
JBasicScopedLock operator=(const JBasicScopedLock &)
 
int lock()
Lock the mutex. 
 
int unlock()
Unlock the mutex. 
 
JBasicScopedLock(const JBasicScopedLock &)
Neither copy-constructible nor copy-assignable. 
 
int unlock()
Unlock the mutex. 
 
JBasicScopedLock(Lockable &lock)
Constructor. 
 
~JBasicScopedLock()
Destructor. 
 
int try_lock()
Try lock the mutex.