|
Veritable Lasagna
An Allocator & Data Structure Library for C.
|
#include <pthread.h>
Include dependency graph for vl_mutex_pthread.c:Functions | |
| vl_mutex | vlMutexNew (void) |
| Creates a new instance of a mutex. | |
| void | vlMutexDelete (vl_mutex mutex) |
| De-initializes and deletes the specified mutex. | |
| void | vlMutexObtain (vl_mutex mutex) |
| Obtains an exclusive lock on the specified mutex. | |
| vl_bool_t | vlMutexTryObtain (vl_mutex mutex) |
| Attempts to obtain an exclusive lock on the specified mutex without blocking. | |
| void | vlMutexRelease (vl_mutex mutex) |
| Releases an exclusive lock on the specified mutex. | |
| void vlMutexDelete | ( | vl_mutex | mutex | ) |
De-initializes and deletes the specified mutex.
VL_MUTEX_NULL (no-op).| mutex | The mutex handle to delete. |
Here is the caller graph for this function:| vl_mutex vlMutexNew | ( | void | ) |
Creates a new instance of a mutex.
vl_mutex handle and is responsible for calling vlMutexDelete.vlMutexDelete.VL_MUTEX_NULL if the mutex could not be created.VL_MUTEX_NULL if heap allocation fails or if platform-specific mutex initialization fails.VL_MUTEX_NULL on failure.
Here is the caller graph for this function:| void vlMutexObtain | ( | vl_mutex | mutex | ) |
Obtains an exclusive lock on the specified mutex.
Only a single thread may obtain an exclusive lock at any given time. This is more suitable for write operations.
VL_MUTEX_NULL (no-op).| mutex | The mutex handle. |
Here is the caller graph for this function:| void vlMutexRelease | ( | vl_mutex | mutex | ) |
Releases an exclusive lock on the specified mutex.
VL_MUTEX_NULL (no-op).| mutex | The mutex handle. |
Here is the caller graph for this function:Attempts to obtain an exclusive lock on the specified mutex without blocking.
VL_MUTEX_NULL (returns VL_FALSE).VL_FALSE if the lock is already held by another thread.VL_TRUE if the lock was successfully obtained, VL_FALSE otherwise.| mutex | The mutex handle. |