Veritable Lasagna
An Allocator & Data Structure Library for C.
Loading...
Searching...
No Matches
vl_mutex.h
Go to the documentation of this file.
1#ifndef VL_MUTEX_H
2#define VL_MUTEX_H
3
4#include "vl_numtypes.h"
5
6#ifndef VL_MUTEX_NULL
7#define VL_MUTEX_NULL 0
8#endif
9
26
33
38void vlMutexDelete(vl_mutex mutex);
39
49
57
63
73
81
87
88#ifndef vlMutexObtain
89/*
90 * \copydoc vlMutexObtainExclusive
91 */
92#define vlMutexObtain(mutex) vlMutexObtainExclusive(mutex)
93#endif
94
95#ifndef vlMutexRelease
99#define vlMutexRelease(mutex) vlMutexReleaseExclusive(mutex)
100#endif
101
102#endif //VL_MUTEX_H
void vlMutexObtainShared(vl_mutex mutex)
Obtain a shared lock on the specified mutex.
Definition vl_mutex_pthread.c:28
vl_bool_t vlMutexTryObtainShared(vl_mutex mutex)
Attempts to obtain a shared lock from the specified mutex.
Definition vl_mutex_pthread.c:35
void vlMutexDelete(vl_mutex mutex)
Deletes the specified mutex.
Definition vl_mutex_pthread.c:18
vl_mutex vlMutexNew()
Creates a new instance of a mutex.
Definition vl_mutex_pthread.c:3
vl_uintptr_t vl_mutex
Mutex handle.
Definition vl_mutex.h:25
void vlMutexReleaseExclusive(vl_mutex mutex)
Releases an exclusive lock on the specified mutex.
Definition vl_mutex_pthread.c:67
void vlMutexReleaseShared(vl_mutex mutex)
Releases a shared lock on the specified mutex.
Definition vl_mutex_pthread.c:43
vl_bool_t vlMutexTryObtainExclusive(vl_mutex mutex)
Attempts to obtain an exclusive lock on the specified mutex.
Definition vl_mutex_pthread.c:59
void vlMutexObtainExclusive(vl_mutex mutex)
Obtains an exclusive lock on the specified mutex.
Definition vl_mutex_pthread.c:51
VL_UPTR_T vl_uintptr_t
Unsigned integer type suitable for expressing memory addresses.
Definition vl_numtypes.h:101
VL_BOOL_T vl_bool_t
Definition vl_numtypes.h:128