Veritable Lasagna
An Allocator & Data Structure Library for C.
Loading...
Searching...
No Matches
vl_srwlock.h
Go to the documentation of this file.
1
14#ifndef VL_SRWLOCK_H
15#define VL_SRWLOCK_H
16
17#include "vl_numtypes.h"
18
19#ifndef VL_SRWLOCK_NULL
20#define VL_SRWLOCK_NULL 0
21#endif
22
49typedef struct vl_srwlock_* vl_srwlock;
50
67VL_API vl_srwlock vlSRWLockNew(void);
68
86VL_API void vlSRWLockDelete(vl_srwlock lock);
87
106VL_API void vlSRWLockObtainShared(vl_srwlock lock);
107
126
142VL_API void vlSRWLockReleaseShared(vl_srwlock lock);
143
162VL_API void vlSRWLockObtainExclusive(vl_srwlock lock);
163
183
199VL_API void vlSRWLockReleaseExclusive(vl_srwlock lock);
200
201#endif // VL_SRWLOCK_H
VL_BOOL_T vl_bool_t
Definition vl_numtypes.h:191
VL_API vl_bool_t vlSRWLockTryObtainExclusive(vl_srwlock lock)
Attempts to obtain an exclusive lock on the specified lock.
Definition vl_srwlock_pthread.c:72
VL_API void vlSRWLockObtainShared(vl_srwlock lock)
Obtain a shared lock on the specified lock.
Definition vl_srwlock_pthread.c:33
struct vl_srwlock_ * vl_srwlock
Slim Read-Write Lock handle for thread synchronization.
Definition vl_srwlock.h:49
VL_API void vlSRWLockDelete(vl_srwlock lock)
Deletes the specified lock.
Definition vl_srwlock_pthread.c:21
VL_API void vlSRWLockReleaseShared(vl_srwlock lock)
Releases a shared lock on the specified lock.
Definition vl_srwlock_pthread.c:52
VL_API vl_srwlock vlSRWLockNew(void)
Creates a new instance of a lock.
Definition vl_srwlock_pthread.c:3
VL_API void vlSRWLockReleaseExclusive(vl_srwlock lock)
Releases an exclusive lock on the specified lock.
Definition vl_srwlock_pthread.c:82
VL_API void vlSRWLockObtainExclusive(vl_srwlock lock)
Obtains an exclusive lock on the specified lock.
Definition vl_srwlock_pthread.c:62
VL_API vl_bool_t vlSRWLockTryObtainShared(vl_srwlock lock)
Attempts to obtain a shared lock from the specified lock.
Definition vl_srwlock_pthread.c:42