High Performance OPC UA Server SDK
1.2.0.193
|
Mutex that can be locked and unlocked for mutual exclusion of different processes. More...
Enumerations | |
enum | ua_mutex_mode { UA_MUTEX_DEFAULT = 0, UA_MUTEX_SHARED = 1 } |
Mode for a newly created mutex. More... | |
Functions | |
int | ua_mutex_init (ua_mutex_t *mutex, int mode) UA_NONNULL(1) |
Initialize a mutex in a given mode. More... | |
int | ua_mutex_clear (ua_mutex_t *mutex) UA_NONNULL(1) |
Clear a mutex. More... | |
int | ua_mutex_lock (ua_mutex_t *mutex) UA_NONNULL(1) |
Lock a mutex. More... | |
int | ua_mutex_unlock (ua_mutex_t *mutex) UA_NONNULL(1) |
Unlock a mutex. More... | |
Mutex that can be locked and unlocked for mutual exclusion of different processes.
enum ua_mutex_mode |
Mode for a newly created mutex.
Enumerator | |
---|---|
UA_MUTEX_DEFAULT |
Default: shared or private is platform specific. |
UA_MUTEX_SHARED |
Mutex can be shared by multiple processes. |
int ua_mutex_clear | ( | ua_mutex_t * | mutex | ) |
Clear a mutex.
the mutex may no longer be locked or unlocked.
mutex | Mutex to clear. |
int ua_mutex_init | ( | ua_mutex_t * | mutex, |
int | mode | ||
) |
Initialize a mutex in a given mode.
The state of the mutex after initialization is unlocked.
mutex | Mutex structure to initialize. |
mode | Mode of the mutex, see ua_mutex_mode. |
int ua_mutex_lock | ( | ua_mutex_t * | mutex | ) |
Lock a mutex.
If the mutex is already locked the calling process shall be blocked until the mutex is unlocked.
mutex | Mutex to lock. |
int ua_mutex_unlock | ( | ua_mutex_t * | mutex | ) |
Unlock a mutex.
The mutex shall only be unlocked by the process that locked it. Only a locked mutex shall be unlocked.
mutex | Mutex to unlock. |