Veritable Lasagna
An Allocator & Data Structure Library for C.
|
#include <pthread.h>
Functions | |
vl_mutex | vlMutexNew () |
Creates a new instance of a mutex. | |
void | vlMutexDelete (vl_mutex mutex) |
Deletes the specified mutex. | |
void | vlMutexObtainShared (vl_mutex mutex) |
Obtain a shared lock on the specified mutex. | |
vl_bool_t | vlMutexTryObtainShared (vl_mutex mutex) |
Attempts to obtain a shared lock from the specified mutex. | |
void | vlMutexReleaseShared (vl_mutex mutex) |
Releases a shared lock on the specified mutex. | |
void | vlMutexObtainExclusive (vl_mutex mutex) |
Obtains an exclusive lock on the specified mutex. | |
vl_bool_t | vlMutexTryObtainExclusive (vl_mutex mutex) |
Attempts to obtain an exclusive lock on the specified mutex. | |
void | vlMutexReleaseExclusive (vl_mutex mutex) |
Releases an exclusive lock on the specified mutex. | |
void vlMutexDelete | ( | vl_mutex | mutex | ) |
Deletes the specified mutex.
vl_mutex vlMutexNew | ( | ) |
Creates a new instance of a mutex.
void vlMutexObtainExclusive | ( | 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.
mutex |
void vlMutexObtainShared | ( | vl_mutex | mutex | ) |
Obtain a shared lock on the specified mutex.
Multiple threads may obtain a shared lock at any given time. This is more suitable for concurrent read operations.
mutex |
void vlMutexReleaseExclusive | ( | vl_mutex | mutex | ) |
Releases an exclusive lock on the specified mutex.
mutex |
void vlMutexReleaseShared | ( | vl_mutex | mutex | ) |
Releases a shared lock on the specified mutex.
mutex |
Attempts to obtain an exclusive lock on the specified mutex.
mutex |