Changeset 2212 in Sophya for trunk/SophyaLib/SysTools/zthread.h


Ignore:
Timestamp:
Oct 15, 2002, 5:48:53 PM (23 years ago)
Author:
ansari
Message:

Mise a jour de la documentation SysTools, Reza 15/10/2002

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/SysTools/zthread.h

    r1612 r2212  
    1414
    1515typedef void (* ZThreadAction) (void *);
    16  
     16
     17/*!
     18  \class SOPHYA::ZThreadExc
     19  \ingroup SysTools
     20  This exception class is used by the classes implementing the interface
     21  to the POSIX threads (\b ZThread ...)
     22*/ 
    1723class ZThreadExc : public PException {
    1824public:
     
    3137  virtual void  run();
    3238
     39  //! Sets the return code for the thread object
    3340  inline void   setRC(int rc) { _rc = rc; }
     41  //! Return the value of the return code for the thread object
    3442  inline int    getRC(int rc) { return(_rc);
    3543 }
     
    6169  explicit      ZMutex();
    6270  virtual       ~ZMutex();
     71  //! Locks the mutex object
    6372  inline void   lock()
    6473    { pthread_mutex_lock(_mutx); }
     74  //! Unlocks the mutex object
    6575  inline void   unlock()
    66     { pthread_mutex_unlock(_mutx); }
     76    { pthread_mutex_unlock(_mutx); }
     77  //! Waits for a condition change
    6778  inline void   wait()
    6879    { pthread_cond_wait(_condv, _mutx); }
     80  //! Signal a condition change on the mutex object
    6981  inline void   signal()
    7082  { pthread_cond_signal(_condv); }
     83  //! Broadcasts a condition change on the mutex object
    7184  inline void   broadcast()
    7285  { pthread_cond_broadcast(_condv); }
     
    8194public:
    8295  explicit inline  ZSync(ZMutex & mtx) {_mtx = &mtx; mtx.lock(); }
    83   inline           ~ZSync() { _mtx->unlock(); }
     96  inline           ~ZSync() { if (_mtx) _mtx->unlock(); }
    8497
    8598private:
Note: See TracChangeset for help on using the changeset viewer.