Files | |
file | edge_mutex.h |
Edge Mutex API. | |
Typedefs | |
typedef pthread_mutex_t | edge_mutex_t |
Functions | |
int32_t | edge_mutex_init (edge_mutex_t *mutex, int32_t type) |
Initializes a mutex. More... | |
int32_t | edge_mutex_destroy (edge_mutex_t *mutex) |
Destroys a mutex. The user is responsible to deallocate the memory for the mutex structure. More... | |
int32_t | edge_mutex_lock (edge_mutex_t *mutex) |
Locks the mutex. More... | |
int32_t | edge_mutex_unlock (edge_mutex_t *mutex) |
Unlocks the mutex. More... | |
int32_t edge_mutex_destroy | ( | edge_mutex_t * | mutex | ) |
Destroys a mutex. The user is responsible to deallocate the memory for the mutex structure.
mutex | pointer to the mutex which should be destroyed. |
int32_t edge_mutex_init | ( | edge_mutex_t * | mutex, |
int32_t | type | ||
) |
Initializes a mutex.
mutex | pointer to the mutex which should be initialized. The user is responsible to allocate the memory for the mutex data structure. |
type | is used for setting mutex type using pthread_mutexattr_settype. See man pthread_mutex_attr . Allowed values are:
|
int32_t edge_mutex_lock | ( | edge_mutex_t * | mutex | ) |
Locks the mutex.
mutex | is a pointer to the mutex structure. |
int32_t edge_mutex_unlock | ( | edge_mutex_t * | mutex | ) |
Unlocks the mutex.
mutex | is a pointer to the mutex structure. |