Salome HOME
copy tag mergefrom_BR_V0_1_CC_Salome_04oct07
[modules/yacs.git] / src / bases / MutexPT.hxx
index ef7c940523fadf6a2fe01593942038495bdf85d8..706de6ff26daed560ca460da242d0aed16e8ab70 100644 (file)
@@ -7,6 +7,8 @@ namespace YACS
 {
   namespace BASES
   {
+    class ConditionPT;
+
     class MutexPT
     {
     public:
@@ -14,11 +16,24 @@ namespace YACS
       ~MutexPT();
       void lock();
       void unlock();
+      friend class ConditionPT;
     private:
       pthread_mutex_t _mutexDesc;
       pthread_mutexattr_t _options;
 
     };
+
+    class ConditionPT
+    {
+    public:
+      ConditionPT();
+      ~ConditionPT();
+      void notify_one();
+      void notify_all();
+      void wait(MutexPT& mutex);
+    private:
+      pthread_cond_t _cond;
+    };
   }
 }