#include <NullMutex.h>
Public Methods | |
| NullMutex () | |
| ~NullMutex () | |
| vpr::ReturnStatus | acquire () const |
| Locks the mutex. More... | |
| vpr::ReturnStatus | acquireRead () const |
| Acquires a read mutex. More... | |
| vpr::ReturnStatus | acquireWrite () const |
| Acquires a write mutex. More... | |
| vpr::ReturnStatus | tryAcquire () const |
| Try to acquire the lock. More... | |
| vpr::ReturnStatus | tryacquire_read () const |
| Tries to acquire a read mutex. More... | |
| vpr::ReturnStatus | tryacquire_write () const |
| Tries to acquire a write mutex. More... | |
| vpr::ReturnStatus | release () const |
| Release the mutex. More... | |
| int | test () |
| Tests the current lock status. More... | |
| void | dump (FILE *dest=stderr, const char *message="\n------Mutex Dump-----\n") const |
| Dumps the mutex debug stuff and current state. More... | |
Protected Methods | |
| void | operator= (const NullMutex &) |
| NullMutex (const NullMutex &) | |
Used to pass a do nothing mutex as a template type.
Definition at line 58 of file NullMutex.h.
|
|
Definition at line 61 of file NullMutex.h.
00061 {}
|
|
|
Definition at line 63 of file NullMutex.h.
00063 {}
|
|
|
Definition at line 142 of file NullMutex.h.
00142 {}
|
|
|
Locks the mutex.
Definition at line 71 of file NullMutex.h.
00072 {
00073 return vpr::ReturnStatus();
00074 }
|
|
|
Acquires a read mutex.
Definition at line 77 of file NullMutex.h.
00078 {
00079 return this->acquire(); // No special "read" semaphore -- For now
00080 }
|
|
|
Acquires a write mutex.
Definition at line 83 of file NullMutex.h.
00084 {
00085 return this->acquire(); // No special "write" semaphore -- For now
00086 }
|
|
|
Try to acquire the lock. Returns immediately even if we don't acquire the lock.
Definition at line 95 of file NullMutex.h.
00096 {
00097 return vpr::ReturnStatus();
00098 }
|
|
|
Tries to acquire a read mutex.
Definition at line 101 of file NullMutex.h.
00102 {
00103 return this->tryAcquire();
00104 }
|
|
|
Tries to acquire a write mutex.
Definition at line 107 of file NullMutex.h.
00108 {
00109 return this->tryAcquire();
00110 }
|
|
|
Release the mutex.
Definition at line 117 of file NullMutex.h.
00118 {
00119 return vpr::ReturnStatus();
00120 }
|
|
|
Tests the current lock status.
Definition at line 128 of file NullMutex.h.
00129 {
00130 return 0; // Just return 0 since it is a null lock
00131 }
|
|
||||||||||||
|
Dumps the mutex debug stuff and current state.
Definition at line 134 of file NullMutex.h.
00135 {
00136 std::cerr << message << "NULL Mutex\n";
00137 }
|
|
|
Definition at line 141 of file NullMutex.h.
00141 {}
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002