#include <LOW_objectSynchronizer.h>
Inheritance diagram for LOW_objectSynchronizer:


Public Methods | |
| LOW_objectSynchronizer & | operator= (const LOW_objectSynchronizer &inRightSide) |
Protected Methods | |
| LOW_objectSynchronizer () | |
| Constructor. More... | |
| LOW_objectSynchronizer (const LOW_objectSynchronizer &inObjectSynchronizer) | |
| Copy constructor. More... | |
| virtual | ~LOW_objectSynchronizer () |
| Destructor. More... | |
Private Attributes | |
| LOW_thread_rwlock * | objectSyncRwlock |
| Rwlock used for locking. More... | |
| LOW_platformMiscFactory::threadIdent_t | writeLockHolder |
| Thread id of the one who's holding a write lock. More... | |
Friends | |
| class | __synchronizeMethodRead |
| class | __synchronizeMethodWrite |
| class | __synchronizeMethodReadWeak |
| class | __synchronizeMethodWriteWeak |
A class which needs synchronization to be thread-save can subclass this class. To serialize the access to a method, simply insert one of the following macros at the beginning of the method:
The implemtation follows the "locking is creation" design pattern and uses a read-write lock. Therefore reentrant calls or successive locking in sub-called methods does no harm.
For locking in static methods some preprocessor macros are provided:
Definition at line 67 of file LOW_objectSynchronizer.h.
|
|
Constructor.
Definition at line 27 of file LOW_objectSynchronizer.cpp. References LOW_thread_Factory::new_rwlock(), objectSyncRwlock, and writeLockHolder. |
|
|
Copy constructor.
Definition at line 34 of file LOW_objectSynchronizer.cpp. References LOW_thread_Factory::new_rwlock(), objectSyncRwlock, and writeLockHolder. |
|
|
Destructor.
Definition at line 41 of file LOW_objectSynchronizer.cpp. References objectSyncRwlock. |
|
|
Definition at line 53 of file LOW_objectSynchronizer.cpp. References LOW_thread_Factory::new_rwlock(), and objectSyncRwlock. |
|
|
Definition at line 583 of file LOW_objectSynchronizer.h. |
|
|
Definition at line 585 of file LOW_objectSynchronizer.h. |
|
|
Definition at line 584 of file LOW_objectSynchronizer.h. |
|
|
Definition at line 586 of file LOW_objectSynchronizer.h. |
|
|
|
Thread id of the one who's holding a write lock.
Definition at line 595 of file LOW_objectSynchronizer.h. Referenced by LOW_objectSynchronizer::__synchronizeMethodReadWeak::__synchronizeMethodReadWeak(), LOW_objectSynchronizer::__synchronizeMethodWrite::__synchronizeMethodWrite(), LOW_objectSynchronizer::__synchronizeMethodWriteWeak::__synchronizeMethodWriteWeak(), LOW_objectSynchronizer(), LOW_objectSynchronizer::__synchronizeMethodWrite::~__synchronizeMethodWrite(), and LOW_objectSynchronizer::__synchronizeMethodWriteWeak::~__synchronizeMethodWriteWeak(). |
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001