#include <thread.h>
Public Member Functions | |
gaurd_writer () | |
Create an unitialized instance of gaurd. | |
gaurd_writer (void *object) | |
Construct a gaurd for a specific object. | |
~gaurd_writer () | |
Release mutex when gaurd falls out of scope. | |
void | set (void *object) |
Set gaurd to mutex lock a new object. | |
void | release (void) |
Prematurely release a gaurd. | |
void | operator= (void *pointer) |
Set gaurd to read lock a new object. |
The rwlock is located from the rwlock pool rather than contained in the target object, and the write lock is released when the gaurd object falls out of scope. This is essentially an automation mechanism for mutex::writer.
Definition at line 586 of file thread.h.
ucc::rwlock::gaurd_writer::gaurd_writer | ( | ) |
Create an unitialized instance of gaurd.
Usually used with a gaurd = operator.
ucc::rwlock::gaurd_writer::gaurd_writer | ( | void * | object | ) |
Construct a gaurd for a specific object.
object | to gaurd. |
void ucc::rwlock::gaurd_writer::operator= | ( | void * | pointer | ) | [inline] |
void ucc::rwlock::gaurd_writer::set | ( | void * | object | ) |
Set gaurd to mutex lock a new object.
If a lock is currently held, it is released.
object | to gaurd. |