Mistake on this page? Email us
edge_mutex.h File Reference

Edge Mutex API. More...

#include <pthread.h>
#include <stdint.h>

Go to the source code of this file.


typedef pthread_mutex_t edge_mutex_t


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...

Detailed Description

Edge Mutex API.

Definition of the Edge mutex API.

This module exists to help testing mutexes. In tests we also use pthread mutexes. Therefore we cannot mock them. Instead we have a library which calls pthread mutexes and can be mocked. Because this module is based on pthread mutexes, more information is available entering for example: "man pthread_mutex_init" in Linux with pthread man page installed. In Ubuntu this manual page is installed using "apt install glibc-doc".