A mutual exclusion synchronization object. More...
#include <mutex.hxx>
Public Member Functions | |
| Mutex () | |
| Create a thread-local mutex. | |
| ~Mutex () | |
| Release the OS-structures and free mutex data-structure. | |
| sal_Bool | acquire () |
| Acquire the mutex, block if already acquired by another thread. | |
| sal_Bool | tryToAcquire () |
| Try to acquire the mutex without blocking. | |
| sal_Bool | release () |
| Release the mutex. | |
Static Public Member Functions | |
| static Mutex * | getGlobalMutex () |
| Returns a global static mutex object. | |
A mutual exclusion synchronization object.
| osl::Mutex::Mutex | ( | ) | [inline] |
Create a thread-local mutex.
| osl::Mutex::~Mutex | ( | ) | [inline] |
Release the OS-structures and free mutex data-structure.
| sal_Bool osl::Mutex::acquire | ( | ) | [inline] |
Acquire the mutex, block if already acquired by another thread.
| static Mutex* osl::Mutex::getGlobalMutex | ( | ) | [inline, static] |
Returns a global static mutex object.
The global and static mutex object can be used to initialize other static objects in a thread safe manner.
| sal_Bool osl::Mutex::release | ( | ) | [inline] |
Release the mutex.
| sal_Bool osl::Mutex::tryToAcquire | ( | ) | [inline] |
Try to acquire the mutex without blocking.
1.6.1