00001 #include "ibrcommon/config.h" 00002 #include "ibrcommon/thread/Mutex.h" 00003 00004 namespace ibrcommon 00005 { 00006 Mutex::Mutex() 00007 { 00008 pthread_mutex_init(&m_mutex, NULL); 00009 } 00010 00011 Mutex::~Mutex() 00012 { 00013 pthread_mutex_destroy( &m_mutex ); 00014 } 00015 00016 void Mutex::enter() 00017 { 00018 pthread_mutex_lock( &m_mutex ); 00019 } 00020 00021 void Mutex::leave() 00022 { 00023 pthread_mutex_unlock( &m_mutex ); 00024 } 00025 }
1.6.3