![]() |
Database::Mutex Class ReferenceMutex container class, used by Lock. More...
Collaboration diagram for Database::Mutex: ![]()
Detailed DescriptionMutex container class, used by Lock.
Definition at line 65 of file Database.h. Constructor & Destructor Documentation
Definition at line 289 of file Database.cpp. References m_mutex. 00290 { 00291 #ifdef _WIN32 00292 m_mutex = ::CreateMutex(NULL, FALSE, NULL); 00293 #else 00294 pthread_mutex_init(&m_mutex, NULL); 00295 #endif 00296 }
Definition at line 299 of file Database.cpp. References m_mutex. 00300 { 00301 #ifdef _WIN32 00302 ::CloseHandle(m_mutex); 00303 #else 00304 pthread_mutex_destroy(&m_mutex); 00305 #endif 00306 }
Member Function Documentation
Definition at line 309 of file Database.cpp. References m_mutex. Referenced by Database::Lock::Lock(). 00310 { 00311 #ifdef _WIN32 00312 DWORD d = WaitForSingleObject(m_mutex, INFINITE); 00313 // %! check 'd' for result 00314 #else 00315 pthread_mutex_lock(&m_mutex); 00316 #endif 00317 }
Definition at line 320 of file Database.cpp. References m_mutex. Referenced by Database::Lock::~Lock(). 00321 { 00322 #ifdef _WIN32 00323 ::ReleaseMutex(m_mutex); 00324 #else 00325 pthread_mutex_unlock(&m_mutex); 00326 #endif 00327 }
Member Data Documentation
The documentation for this class was generated from the following files: |