ROOT logo
// @(#)root/thread:$Id: TPosixThreadFactory.cxx 20882 2007-11-19 11:31:26Z rdm $
// 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.             *
 *************************************************************************/

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TPosixThreadFactory                                                  //
//                                                                      //
// This is a factory for Posix thread components.                       //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include "TPosixThreadFactory.h"
#include "TPosixMutex.h"
#include "TPosixCondition.h"
#include "TPosixThread.h"

// Force creation of TPosixThreadFactory when shared library will be loaded
// (don't explicitely create a TPosixThreadFactory).
static TPosixThreadFactory gPosixThreadFactoryCreator;

ClassImp(TPosixThreadFactory)

//______________________________________________________________________________
TPosixThreadFactory::TPosixThreadFactory(const char *name, const char *title) :
                     TThreadFactory(name, title)
{
   // Create Posix thread factory. Also sets global gThreadFactory to this.

   gThreadFactory = this;
}

//______________________________________________________________________________
TMutexImp *TPosixThreadFactory::CreateMutexImp()
{
   // Return a Posix Mutex.

   return new TPosixMutex;
}

//______________________________________________________________________________
TThreadImp *TPosixThreadFactory::CreateThreadImp()
{
   // Return a Posix thread.

   return new TPosixThread;
}

//______________________________________________________________________________
TConditionImp *TPosixThreadFactory::CreateConditionImp(TMutexImp *m)
{
   // Return a Posix condition variable.

   return new TPosixCondition(m);
}
 TPosixThreadFactory.cxx:1
 TPosixThreadFactory.cxx:2
 TPosixThreadFactory.cxx:3
 TPosixThreadFactory.cxx:4
 TPosixThreadFactory.cxx:5
 TPosixThreadFactory.cxx:6
 TPosixThreadFactory.cxx:7
 TPosixThreadFactory.cxx:8
 TPosixThreadFactory.cxx:9
 TPosixThreadFactory.cxx:10
 TPosixThreadFactory.cxx:11
 TPosixThreadFactory.cxx:12
 TPosixThreadFactory.cxx:13
 TPosixThreadFactory.cxx:14
 TPosixThreadFactory.cxx:15
 TPosixThreadFactory.cxx:16
 TPosixThreadFactory.cxx:17
 TPosixThreadFactory.cxx:18
 TPosixThreadFactory.cxx:19
 TPosixThreadFactory.cxx:20
 TPosixThreadFactory.cxx:21
 TPosixThreadFactory.cxx:22
 TPosixThreadFactory.cxx:23
 TPosixThreadFactory.cxx:24
 TPosixThreadFactory.cxx:25
 TPosixThreadFactory.cxx:26
 TPosixThreadFactory.cxx:27
 TPosixThreadFactory.cxx:28
 TPosixThreadFactory.cxx:29
 TPosixThreadFactory.cxx:30
 TPosixThreadFactory.cxx:31
 TPosixThreadFactory.cxx:32
 TPosixThreadFactory.cxx:33
 TPosixThreadFactory.cxx:34
 TPosixThreadFactory.cxx:35
 TPosixThreadFactory.cxx:36
 TPosixThreadFactory.cxx:37
 TPosixThreadFactory.cxx:38
 TPosixThreadFactory.cxx:39
 TPosixThreadFactory.cxx:40
 TPosixThreadFactory.cxx:41
 TPosixThreadFactory.cxx:42
 TPosixThreadFactory.cxx:43
 TPosixThreadFactory.cxx:44
 TPosixThreadFactory.cxx:45
 TPosixThreadFactory.cxx:46
 TPosixThreadFactory.cxx:47
 TPosixThreadFactory.cxx:48
 TPosixThreadFactory.cxx:49
 TPosixThreadFactory.cxx:50
 TPosixThreadFactory.cxx:51
 TPosixThreadFactory.cxx:52
 TPosixThreadFactory.cxx:53
 TPosixThreadFactory.cxx:54
 TPosixThreadFactory.cxx:55
 TPosixThreadFactory.cxx:56
 TPosixThreadFactory.cxx:57
 TPosixThreadFactory.cxx:58
 TPosixThreadFactory.cxx:59
 TPosixThreadFactory.cxx:60
 TPosixThreadFactory.cxx:61
 TPosixThreadFactory.cxx:62