GPL_LocalLock
GPL_LocalLock
gpl
1998 12-05
CLASS
GPL_LocalLock - A local read/write locking mechanism.
SYNOPSIS
GPL_LocalLock is a read/write locking mechanism that is 'local' in that
it exists in the address space of the threads using it. In other words,
it is an inter thread communication mechanism as opposed to an inter
process communication mechanism.
This is a one writer/no reader or no writer/multiple reader lock.
It is implemented with three mutexes and one counter because a mutex is
the most universal mechanism available.
CONSTRUCTOR
GPL_LocalLock()
Creates three OSD_Mutex objects.
MEMBER FUNCTIONS
long StartRead()
Obtains a read lock, blocking until a read lock is obtained. Return
TRUE on success, FALSE on failure.
long StopRead()
Releases a read lock. Return TRUE on success, FALSE on
failure.
long StartWrite()
Obtains a write lock, blocking until a write lock is obtained. Return
TRUE on success, FALSE on failure.
long StopWrite()
Releases a write lock. Return TRUE on success, FALSE on
failure.