TPosixThread.h

Go to the documentation of this file.
00001 // @(#)root/thread:$Id: TPosixThread.h 35197 2010-09-08 12:34:39Z rdm $
00002 // Author: Fons Rademakers   02/07/97
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TPosixThread
00013 #define ROOT_TPosixThread
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TPosixThread                                                         //
00019 //                                                                      //
00020 // This class provides an interface to the posix thread routines.       //
00021 //                                                                      //
00022 //////////////////////////////////////////////////////////////////////////
00023 
00024 #ifndef ROOT_TThreadImp
00025 #include "TThreadImp.h"
00026 #endif
00027 
00028 #ifndef __CINT__
00029 #include <pthread.h>
00030 #endif
00031 
00032 R__EXTERN "C" unsigned int sleep(unsigned int seconds);
00033 
00034 class TPosixThreadCleanUp;
00035 
00036 
00037 class TPosixThread : public TThreadImp {
00038 
00039 public:
00040    TPosixThread() { }
00041    ~TPosixThread() { }
00042 
00043    virtual Int_t  Join(TThread *th, void **ret);
00044    virtual Long_t SelfId();
00045    virtual Int_t  Run(TThread *th);
00046 
00047    virtual Int_t  Kill(TThread *th);
00048    virtual Int_t  SetCancelOff();
00049    virtual Int_t  SetCancelOn();
00050    virtual Int_t  SetCancelAsynchronous();
00051    virtual Int_t  SetCancelDeferred();
00052    virtual Int_t  CancelPoint();
00053    virtual Int_t  CleanUpPush(void **main, void *free,void *arg);
00054    virtual Int_t  CleanUpPop(void **main, Int_t exe);
00055    virtual Int_t  CleanUp(void **main);
00056 
00057    virtual Int_t  Exit(void *ret);
00058 
00059    ClassDef(TPosixThread,0)  // TPosixThread class
00060 };
00061 
00062 
00063 class TPosixThreadCleanUp {
00064 
00065 friend class TPosixThread;
00066 
00067 private:
00068    void                *fRoutine;
00069    void                *fArgument;
00070    TPosixThreadCleanUp *fNext;
00071 
00072 public:
00073    TPosixThreadCleanUp(void **main, void *routine, void *arg);
00074    ~TPosixThreadCleanUp() { }
00075 };
00076 
00077 #endif

Generated on Tue Jul 5 14:11:59 2011 for ROOT_528-00b_version by  doxygen 1.5.1