// @(#)root/thread:$Id$
// Author: Fons Rademakers   01/07/97

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TPosixCondition
#define ROOT_TPosixCondition


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TPosixCondition                                                      //
//                                                                      //
// This class provides an interface to the posix condition variable     //
// routines.                                                            //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TConditionImp
#include "TConditionImp.h"
#endif

#ifndef __CINT__
#include <pthread.h>
#else
struct pthread_cond_t;
#endif

class TMutexImp;
class TPosixMutex;


class TPosixCondition : public TConditionImp {

private:
   pthread_cond_t  fCond;    // the pthread condition variable
   TPosixMutex    *fMutex;   // mutex used around Wait() and TimedWait()

public:
   TPosixCondition(TMutexImp *m);
   virtual ~TPosixCondition();

   Int_t  Wait();
   Int_t  TimedWait(ULong_t secs, ULong_t nanoSecs = 0);
   Int_t  Signal();
   Int_t  Broadcast();

   ClassDef(TPosixCondition,0)   // Posix condition variable
};

#endif
 TPosixCondition.h:1
 TPosixCondition.h:2
 TPosixCondition.h:3
 TPosixCondition.h:4
 TPosixCondition.h:5
 TPosixCondition.h:6
 TPosixCondition.h:7
 TPosixCondition.h:8
 TPosixCondition.h:9
 TPosixCondition.h:10
 TPosixCondition.h:11
 TPosixCondition.h:12
 TPosixCondition.h:13
 TPosixCondition.h:14
 TPosixCondition.h:15
 TPosixCondition.h:16
 TPosixCondition.h:17
 TPosixCondition.h:18
 TPosixCondition.h:19
 TPosixCondition.h:20
 TPosixCondition.h:21
 TPosixCondition.h:22
 TPosixCondition.h:23
 TPosixCondition.h:24
 TPosixCondition.h:25
 TPosixCondition.h:26
 TPosixCondition.h:27
 TPosixCondition.h:28
 TPosixCondition.h:29
 TPosixCondition.h:30
 TPosixCondition.h:31
 TPosixCondition.h:32
 TPosixCondition.h:33
 TPosixCondition.h:34
 TPosixCondition.h:35
 TPosixCondition.h:36
 TPosixCondition.h:37
 TPosixCondition.h:38
 TPosixCondition.h:39
 TPosixCondition.h:40
 TPosixCondition.h:41
 TPosixCondition.h:42
 TPosixCondition.h:43
 TPosixCondition.h:44
 TPosixCondition.h:45
 TPosixCondition.h:46
 TPosixCondition.h:47
 TPosixCondition.h:48
 TPosixCondition.h:49
 TPosixCondition.h:50
 TPosixCondition.h:51
 TPosixCondition.h:52
 TPosixCondition.h:53
 TPosixCondition.h:54
 TPosixCondition.h:55
 TPosixCondition.h:56
 TPosixCondition.h:57