Initialize(), Finalize(), GetSize(),
and Resize(). The default definitions, which do nothing, for
StartRead(), StopRead(), StartWrite(), and
StopWrite() can be used, although the lack of locking should be
explicitly noted in the documentation for the derived class.
| GPL_Object | public |
virtual GPL_Boolean Resize(const unsigned long size) = 0
Resize the memory block to size bytes. Return TRUE if the
resizing succeeded and FALSE if the resize failed.
virtual void Initialize(void)
Initialize the memory block.
virtual void Finalize(void)
Finalize the memory block.
virtual GPL_Boolean StartRead(const GPL_Opaque key, GPL_Address address, const unsigned long size)
Copy size bytes from the location specified by key to the
address specified by address. Attempt to acquire a shared lock on
key, returning immediately if the lock could not be acquired. Return
TRUE if key is valid and the lock is acquired and FALSE
otherwise.
virtual GPL_Boolean StopRead(const GPL_Opaque key)
Release the shared lock on key. Return TRUE if the lock was
released and FALSE otherwise.
virtual GPL_Boolean StartWait(const GPL_Opaque key, GPL_Address address, const unsigned long size)
Copy size bytes from the location specified by key to the
address specified by address. Attemp to acquire a shared lock on
key, blocking until the lock can be acquired. Return TRUE if
key is valid and FALSE otherwise.
virtual GPL_Boolean StopWait(const GPL_Opaque key)
Release the shared lock on key. Return TRUE if the lock was
released and FALSE otherwise.
virtual GPL_Boolean StartWrite(const GPL_Opaque key, GPL_Address address, const unsigned long size)
Copy size bytes from the location specified by key to the
address specified by address. Acquire an exclusive lock on key.
Return TRUE if key is valid and the lock is acquired and
FALSE otherwise.
virtual GPL_Boolean StopWrite(const GPL_Opaque key, GPL_Address address, const unsigned long size)
Copy size bytes from the address specified by address to the
location specified by key. Release the exclusive lock on key.
Return TRUE if key is valid and the lock is released and
FALSE otherwise.