AlterOffice
AlterOffice 3.4 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mutex.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 
3 
4 #ifndef INCLUDED_OSL_MUTEX_H
5 #define INCLUDED_OSL_MUTEX_H
6 
7 #include "sal/config.h"
8 
9 #include "sal/saldllapi.h"
10 #include "sal/types.h"
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 struct _oslMutexImpl;
17 typedef struct _oslMutexImpl * oslMutex;
18 
23 SAL_DLLPUBLIC oslMutex SAL_CALL osl_createMutex(void);
24 
29 SAL_DLLPUBLIC void SAL_CALL osl_destroyMutex(oslMutex Mutex);
30 
35 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_acquireMutex(oslMutex Mutex);
36 
43 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutex Mutex);
44 
50 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_releaseMutex(oslMutex Mutex);
51 
56 SAL_DLLPUBLIC oslMutex * SAL_CALL osl_getGlobalMutex(void);
57 
58 #ifdef __cplusplus
59 }
60 #endif
61 
62 #endif // INCLUDED_OSL_MUTEX_H
63 
64 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_DLLPUBLIC oslMutex * osl_getGlobalMutex(void)
Returns a unique and global mutex.
SAL_DLLPUBLIC sal_Bool osl_acquireMutex(oslMutex Mutex)
Acquire the mutex, block if already acquired by another thread.
struct _oslMutexImpl * oslMutex
Definition: mutex.h:17
unsigned char sal_Bool
Definition: types.h:18
SAL_DLLPUBLIC sal_Bool osl_tryToAcquireMutex(oslMutex Mutex)
Try to acquire the mutex without blocking.
SAL_DLLPUBLIC oslMutex osl_createMutex(void)
Create a mutex.
SAL_DLLPUBLIC sal_Bool osl_releaseMutex(oslMutex Mutex)
Release the mutex.
SAL_DLLPUBLIC void osl_destroyMutex(oslMutex Mutex)
Release the OS-structures and free mutex data-structure.
#define SAL_DLLPUBLIC
Definition: saldllapi.h:14