S2OPC OPCUA Toolkit
|
Go to the source code of this file.
Macros | |
#define | SOPC_INVALID_COND NULL |
#define | SOPC_INVALID_MUTEX NULL |
Typedefs | |
typedef struct SOPC_Condition_Impl | SOPC_Condition_Impl |
Provides a condition-variable mechanism that supports single and broadcast notifications. More... | |
typedef SOPC_Condition_Impl * | SOPC_Condition |
typedef struct SOPC_Mutex_Impl | SOPC_Mutex_Impl |
Provides a mutex mechanism that supports recursive locking. More... | |
typedef SOPC_Mutex_Impl * | SOPC_Mutex |
The platform-specific implementation for all mutex-related services. Each platform implementation shall provide the actual definition of:
#define SOPC_INVALID_COND NULL |
#define SOPC_INVALID_MUTEX NULL |
typedef struct SOPC_Condition_Impl SOPC_Condition_Impl |
Provides a condition-variable mechanism that supports single and broadcast notifications.
typedef SOPC_Condition_Impl* SOPC_Condition |
typedef struct SOPC_Mutex_Impl SOPC_Mutex_Impl |
Provides a mutex mechanism that supports recursive locking.
typedef SOPC_Mutex_Impl* SOPC_Mutex |
SOPC_ReturnStatus SOPC_Condition_Init | ( | SOPC_Condition * | cond | ) |
Create a Condition variable.
cond | A non-NULL pointer to a condition to be created |
SOPC_ReturnStatus SOPC_Condition_Clear | ( | SOPC_Condition * | cond | ) |
Delete a Condition variable.
cond | A non-NULL pointer to a condition to be deleted |
SOPC_ReturnStatus SOPC_Condition_SignalAll | ( | SOPC_Condition * | cond | ) |
Signals the condition variable to all waiting threads.
cond | A non-NULL pointer to a condition to be signaled |
SOPC_ReturnStatus SOPC_Mutex_Initialization | ( | SOPC_Mutex * | mut | ) |
Create a Mutex.
mut | A non-NULL pointer to a Mutex to be created |
SOPC_ReturnStatus SOPC_Mutex_Clear | ( | SOPC_Mutex * | mut | ) |
Delete a Mutex.
mut | A non-NULL pointer to a Mutex to be deleted |
SOPC_ReturnStatus SOPC_Mutex_Lock | ( | SOPC_Mutex * | mut | ) |
Lock a Mutex. The function may be blocking as long as the mutex is locked by another thread.
mut | A non-NULL pointer to a Mutex to be locked |
SOPC_ReturnStatus SOPC_Mutex_Unlock | ( | SOPC_Mutex * | mut | ) |
Release a Mutex.
mut | A non-NULL pointer to a Mutex to be unlocked |
SOPC_ReturnStatus SOPC_Mutex_UnlockAndWaitCond | ( | SOPC_Condition * | cond, |
SOPC_Mutex * | mut | ||
) |
Wait for a condition variable notification.
cond | A non-NULL pointer to a Condition variable to wait for |
mut | A non-NULL pointer to the related Mutex. This Mutex shall be locked by caller before call and unlocked after return. |
SOPC_ReturnStatus SOPC_Mutex_UnlockAndTimedWaitCond | ( | SOPC_Condition * | cond, |
SOPC_Mutex * | mut, | ||
uint32_t | milliSecs | ||
) |
Timed wait for a condition variable notification.
cond | A non-NULL pointer to a Condition variable to wait for |
mut | A non-NULL pointer to the related Mutex. This Mutex shall be locked by caller before call and unlocked after return. |
milliSecs | The maximum amount of wait time. |