INOS
|
#include <inos_syn.h>
Public Member Functions | |
void | ReadLock () |
void | ReadUnlock () |
void | WriteLock () |
void | WriteUnlock () |
Reader writer lock. It allows multiple readers (but no writer) to lock a resource at the same time, but only allows one writer (and no readers). This is often useful for seldom changing resources.
|
inline |
Call this function to "read lock" a resource. I.e. the caller wants to access the resource without modifying it. The caller will be locked if a "writer lock" is already taken.
|
inline |
Undo ReadLock()
|
inline |
Call this function to "write lock" a resource. I.e. the caller wants to delete or otherwise modify the resource. The caller will be blocked if "read locks" are taken or if another task already owns the "write lock".
|
inline |
Undo WriteLock()