Changeset 3219 in Sophya
- Timestamp:
- Apr 12, 2007, 5:15:41 PM (18 years ago)
- Location:
- trunk/SophyaLib/SysTools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/SysTools/zthread.cc
r3217 r3219 213 213 Constructor: Creates a associated pair of POSIX \c pthread_mutex_t 214 214 and \c pthread_cond_t objects 215 */ 216 ZMutex::ZMutex() 215 \param : if fgd == true , the destructor call pthread_mutex_destroy/pthread_cond_destroy 216 */ 217 ZMutex::ZMutex(bool fgd) 217 218 { 218 219 _mutx = new pthread_mutex_t; … … 223 224 rc = pthread_cond_init(_condv, NULL); 224 225 CheckSt(rc,"ZMutex::ZMutex() Pb pthread_cond_init"); 226 _fgd = fgd; 225 227 } 226 228 227 229 ZMutex::~ZMutex() 228 230 { 231 if (_fgd == false) return; 229 232 int rc; 230 233 rc = pthread_mutex_destroy(_mutx); -
trunk/SophyaLib/SysTools/zthread.h
r3217 r3219 91 91 class ZMutex { 92 92 public: 93 explicit ZMutex( );93 explicit ZMutex(bool fgd=false); 94 94 virtual ~ZMutex(); 95 95 //! Locks the mutex object … … 118 118 pthread_mutex_t * _mutx; 119 119 pthread_cond_t * _condv; 120 bool _fgd; 120 121 }; 121 122
Note:
See TracChangeset
for help on using the changeset viewer.