#include <PsnMutexLock.h>
Public Methods | |
| PsnMutexLock () | |
| constructor | |
| virtual | ~PsnMutexLock () |
| destructor | |
| int | protect () |
| not virtual, cause this is an implementation class, tied to phtreads | |
| int | unprotect () |
| not virtual, cause this is an implementation class, tied to phtreads | |
Protected Attributes | |
| pthread_mutex_t | mutex |
Friends | |
| class | PsnCondition |
A class for ensuring mutual exclusion in multithreaded situations.
Definition at line 30 of file PsnMutexLock.h.
|
|
constructor
Definition at line 28 of file PsnMutexLock.cxx. References PsController::error(), and mutex.
00028 {
00029 #ifdef NDEBUG
00030 int ret =
00031 #endif
00032 pthread_mutex_init(&mutex , NULL);
00033 #ifdef NDEBUG
00034 if (ret) {
00035 PsController::error("PsnMutexLock::PsnMutexLock() failed");
00036 }
00037 #endif
00038 }
|
|
|
destructor
Definition at line 40 of file PsnMutexLock.cxx. References PsController::error(), and mutex.
00040 {
00041 #ifdef NDEBUG
00042 int ret =
00043 #endif
00044 pthread_mutex_destroy( &mutex );
00045 #ifdef NDEBUG
00046 if (ret) {
00047 PsController::error("PsnMutexLock::~PsnMutexLock() failed");
00048 }
00049 #endif
00050 }
|
|
|
|
|
Definition at line 45 of file PsnMutexLock.h. |
|
|
Definition at line 46 of file PsnMutexLock.h. Referenced by protect(), PsnMutexLock(), unprotect(), PsnCondition::waitForChange(), and ~PsnMutexLock(). |
| Documentation generated on Mon Nov 25 15:26:14 2002 |
Generated with doxygen 1.2.12 by Dimitri van Heesch , 1997-2001 |