LibreOffice
LibreOffice 24.2 SDK C/C++ API Reference
|
A mutual exclusion synchronization object. More...
#include <mutex.hxx>
Public Member Functions | |
Mutex () | |
Create a mutex. More... | |
~Mutex () | |
Release the OS-structures and free mutex data-structure. More... | |
bool | acquire () |
Acquire the mutex, block if already acquired by another thread. More... | |
bool | tryToAcquire () |
Try to acquire the mutex without blocking. More... | |
bool | release () |
Release the mutex. More... | |
Static Public Member Functions | |
static Mutex * | getGlobalMutex () |
Returns a global static mutex object. More... | |
Friends | |
oslMutex * | osl_getGlobalMutex () |
Returns a unique and global mutex. More... | |
A mutual exclusion synchronization object.
|
inline |
Create a mutex.
The mutex value is 0 if it could not be created, otherwise a handle to the mutex.
|
inline |
Release the OS-structures and free mutex data-structure.
|
inline |
Acquire the mutex, block if already acquired by another thread.
|
inlinestatic |
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.
|
inline |
|
inline |
Try to acquire the mutex without blocking.
|
friend |
Returns a unique and global mutex.