Functions | |
zrtp_status_t | zrtp_mutex_init (zrtp_mutex_t **mutex) |
Initializing the mutex structure. | |
zrtp_status_t | zrtp_mutex_destroy (zrtp_mutex_t *mutex) |
Deinitializing the mutex structure. | |
zrtp_status_t | zrtp_mutex_lock (zrtp_mutex_t *mutex) |
Mutex locking. | |
zrtp_status_t | zrtp_mutex_unlock (zrtp_mutex_t *mutex) |
Mutex releasing. |
zrtp_status_t zrtp_mutex_destroy | ( | zrtp_mutex_t * | mutex | ) |
Deinitializing the mutex structure.
This function destroys the mutex object previously allocated by zrtp_mutex_init().
mutex | - mutex structure for deinitialization. |
zrtp_status_t zrtp_mutex_init | ( | zrtp_mutex_t ** | mutex | ) |
Initializing the mutex structure.
This function allocates and initializes the mutex referenced by mutex
with default attributes. Upon successful initialization, the state of the mutex becomes initialized and unlocked. This function should create a NON RECURSIVE mutex. (Attempting to relock the mutex causes deadlock)
mutex | - out parameter, mutex structure for allocation and initialization |
zrtp_status_t zrtp_mutex_lock | ( | zrtp_mutex_t * | mutex | ) |
Mutex locking.
This function locks the mutex object referenced by mutex
. If the mutex is already locked, the thread that called it is blocked until the mutex becomes available. This operation returns the mutex object referenced by the mutex in the locked state with the calling thread as its owner.
mutex | - mutex for locking; |
zrtp_status_t zrtp_mutex_unlock | ( | zrtp_mutex_t * | mutex | ) |
Mutex releasing.
This function releases the mutex object referenced by mutex. The way a mutex is released depends on the mutex's type attribute. If there are threads blocked on the mutex object referenced by mutex when zrtp_mutex_unlock() is called and the mutex becomes available, the scheduling policy determines which thread acquires the mutex.
mutex | - mutex to release |