#include <Mutex.h>
Inheritance diagram for zypp::thread::Mutex:
Public Member Functions | |
Mutex () | |
Create a new recursive Mutex object. | |
~Mutex () | |
Destroys this Mutex object. | |
void | lock () |
Acquire ownership of this Mutex object. | |
void | unlock () |
Release ownership of this Mutex object. | |
bool | trylock () |
Try to acquire ownership of this Mutex object. | |
Private Attributes | |
RecursiveMutex_t | m_mutex |
Definition at line 35 of file Mutex.h.
|
Create a new recursive Mutex object.
Definition at line 24 of file Mutex.cc. References m_mutex, and ZYPP_THROW_ERRNO_MSG. |
|
Destroys this Mutex object.
Definition at line 51 of file Mutex.cc. References m_mutex. |
|
Acquire ownership of this Mutex object. This call will block if another thread has ownership of this Mutex. When it returns, the current thread is the owner of this Mutex object. In the same thread, this recursive mutex can be acquired multiple times.
Definition at line 71 of file Mutex.cc. References m_mutex, and ZYPP_THROW_ERRNO_MSG. Referenced by zypp::thread::MutexLock::lock(). |
|
Release ownership of this Mutex object. If another thread is waiting to acquire the ownership of this mutex it will stop blocking and acquire ownership when this call returns.
Definition at line 81 of file Mutex.cc. References m_mutex, and ZYPP_THROW_ERRNO_MSG. Referenced by zypp::thread::MutexLock::unlock(). |
|
Try to acquire ownership of this Mutex object. This call will return false if another thread has ownership of this Mutex or the maximum number of recursive locks for mutex has been exceeded. When it returns true, the current thread is the owner of this Mutex object.
Definition at line 91 of file Mutex.cc. References m_mutex. Referenced by zypp::thread::MutexLock::trylock(). |
|
Definition at line 82 of file Mutex.h. Referenced by lock(), Mutex(), trylock(), unlock(), and ~Mutex(). |