LibreOffice
LibreOffice 5.3 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Typedefs | Functions
mutex.h File Reference
#include <sal/config.h>
#include <sal/saldllapi.h>
#include <sal/types.h>

Go to the source code of this file.

Typedefs

typedef struct _oslMutexImpl * oslMutex
 

Functions

SAL_DLLPUBLIC oslMutex osl_createMutex (void)
 Create a mutex. More...
 
SAL_DLLPUBLIC void osl_destroyMutex (oslMutex Mutex)
 Release the OS-structures and free mutex data-structure. More...
 
SAL_DLLPUBLIC sal_Bool osl_acquireMutex (oslMutex Mutex)
 Acquire the mutex, block if already acquired by another thread. More...
 
SAL_DLLPUBLIC sal_Bool osl_tryToAcquireMutex (oslMutex Mutex)
 Try to acquire the mutex without blocking. More...
 
SAL_DLLPUBLIC sal_Bool osl_releaseMutex (oslMutex Mutex)
 Release the mutex. More...
 
SAL_DLLPUBLIC oslMutexosl_getGlobalMutex (void)
 Returns a unique and global mutex. More...
 

Typedef Documentation

typedef struct _oslMutexImpl* oslMutex

Function Documentation

SAL_DLLPUBLIC sal_Bool osl_acquireMutex ( oslMutex  Mutex)

Acquire the mutex, block if already acquired by another thread.

Parameters
Mutexhandle to a created mutex.
Returns
False if system-call fails.
SAL_DLLPUBLIC oslMutex osl_createMutex ( void  )

Create a mutex.

Returns
0 if the mutex could not be created, otherwise a handle to the mutex.
SAL_DLLPUBLIC void osl_destroyMutex ( oslMutex  Mutex)

Release the OS-structures and free mutex data-structure.

Parameters
Mutexthe mutex-handle
SAL_DLLPUBLIC oslMutex* osl_getGlobalMutex ( void  )

Returns a unique and global mutex.

Returns
the global mutex.
SAL_DLLPUBLIC sal_Bool osl_releaseMutex ( oslMutex  Mutex)

Release the mutex.

Parameters
Mutexhandle to a created mutex.
Returns
False if system-call fails.
SAL_DLLPUBLIC sal_Bool osl_tryToAcquireMutex ( oslMutex  Mutex)

Try to acquire the mutex without blocking.

Parameters
Mutexhandle to a created mutex.
Returns
False if it could not be acquired.