Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TPosixThread.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/thread:$Id$
0002 // Author: Fons Rademakers   02/07/97
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TPosixThread
0013 #define ROOT_TPosixThread
0014 
0015 
0016 //////////////////////////////////////////////////////////////////////////
0017 //                                                                      //
0018 // TPosixThread                                                         //
0019 //                                                                      //
0020 // This class provides an interface to the posix thread routines.       //
0021 //                                                                      //
0022 //////////////////////////////////////////////////////////////////////////
0023 
0024 #include "TThreadImp.h"
0025 
0026 #include <pthread.h>
0027 
0028 R__EXTERN "C" unsigned int sleep(unsigned int seconds);
0029 
0030 class TPosixThreadCleanUp;
0031 
0032 
0033 class TPosixThread : public TThreadImp {
0034 
0035 public:
0036    TPosixThread() { }
0037    ~TPosixThread() { }
0038 
0039    Int_t  Join(TThread *th, void **ret) override;
0040    Long_t SelfId() override;
0041    Int_t  Run(TThread *th, const int affinity = -1) override;
0042 
0043    Int_t  Kill(TThread *th) override;
0044    Int_t  SetCancelOff() override;
0045    Int_t  SetCancelOn() override;
0046    Int_t  SetCancelAsynchronous() override;
0047    Int_t  SetCancelDeferred() override;
0048    Int_t  CancelPoint() override;
0049    Int_t  CleanUpPush(void **main, void *free,void *arg) override;
0050    Int_t  CleanUpPop(void **main, Int_t exe) override;
0051    Int_t  CleanUp(void **main) override;
0052 
0053    Int_t  Exit(void *ret) override;
0054 
0055    ClassDefOverride(TPosixThread,0)  // TPosixThread class
0056 };
0057 
0058 
0059 class TPosixThreadCleanUp {
0060 
0061 friend class TPosixThread;
0062 
0063 private:
0064    void                *fRoutine;
0065    void                *fArgument;
0066    TPosixThreadCleanUp *fNext;
0067 
0068 public:
0069    TPosixThreadCleanUp(void **main, void *routine, void *arg);
0070    ~TPosixThreadCleanUp() { }
0071 };
0072 
0073 #endif