[Compbench-devel] CompBenchmarks++/libcompbenchmarks/Base Thread.h, 1.2, 1.3
Brought to you by:
xfred
|
From: Frederic T. <xf...@us...> - 2007-09-04 16:56:29
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv13250 Modified Files: Thread.h Log Message: Obsolete code removed. Few advances on comments and documentation. Index: Thread.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base/Thread.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Thread.h 6 Jun 2007 16:01:09 -0000 1.2 --- Thread.h 4 Sep 2007 16:56:23 -0000 1.3 *************** *** 12,29 **** namespace CBM { ! /** \brief Class for storing and managing threads */ class Mutex { private: pthread_mutex_t mutex; public: Mutex(); virtual void Lock(void); virtual void Unlock(void); virtual ~Mutex(); }; class Thread { private: --- 12,46 ---- namespace CBM { ! /** \brief Class for storing and managing pthread's mutexes. */ class Mutex { private: + /** Internal pthread mutex object. */ pthread_mutex_t mutex; public: + /** Constructor */ Mutex(); + + /** Locks mutex. + * + * Locks or wait for mutex availability (to take/lock it). + */ virtual void Lock(void); + + /** Unlocks mutex. */ virtual void Unlock(void); + /** Destructor. + * + * Destroy internal pthread mutex. + * \sa mutex */ virtual ~Mutex(); }; + /** \brief Class for managing threads. + * + * Uses pthread's threads. + */ class Thread { private: *************** *** 64,83 **** }; - class ThreadActionTest : public ThreadAction { - private: - int slp; - Mutex m; - - protected: - virtual void routine(void); - - public: - ThreadActionTest(); - - virtual float Progress(void); - - ~ThreadActionTest(); - }; - pthread_t currentThread(void); } --- 81,84 ---- |