TThread


class description - source file - inheritance tree

class TThread : public TNamed

    private:
static void AfterCancel(TThread* th) static ULong_t Call(void* p2f, void* arg) void Constructor() static void* Fun(void* ptr) char* GetComm() void PutComm(const char* txt = "0") static Int_t XARequest(const char* xact, Int_t nb, void** ar, Int_t* iret) public:
TThread TThread(void *(*)(void*) fn, void* arg = 0, TThread::EPriority pri = kNormalPriority) TThread TThread(Int_t id = 0) TThread TThread(const char* thname, void *(*)(void*) fn, void* arg = 0, TThread::EPriority pri = kNormalPriority) TThread TThread(TThread&) virtual void ~TThread() static Int_t CancelPoint() static TClass* Class() static Int_t CleanUp() static Int_t CleanUpPop(Int_t exe = 0) static Int_t CleanUpPush(void* free, void* arg = 0) static void Debu(const char* txt) virtual void Delete(Option_t* option) static Int_t Delete(TThread*& th) static Int_t Exists() static Int_t Exit(void* ret = 0) Long_t GetId() const Long_t GetJoindId() const TThread::EPriority GetPriority() const TThread::EState GetState() const static TThread* GetThread(Long_t id) static TThread* GetThread(const char* name) static Int_t GetTime(ULong_t* absSec, ULong_t* absNanoSec) virtual TClass* IsA() const static Long_t Join(Long_t id, void** ret = 0) static Long_t Join(void** ret = 0) Int_t Kill() static Int_t Kill(Long_t id) static Int_t Kill(const char* name) static Int_t Lock() static Int_t MakeFun(char* funname) static void Printf(const char* txt) static void Printf(const char* txt, Long_t i) static void Printf(const char* txt, void* i) void Ps() void ps() Int_t Run(void* arg = 0) static TThread* Self() static Long_t SelfId() static Int_t SetCancelAsynchronous() static Int_t SetCancelDeferred() static Int_t SetCancelOff() static Int_t SetCancelOn() void SetJoinId(TThread* tj) void SetJoinId(Long_t jid) void SetPriority(TThread::EPriority pri) virtual void ShowMembers(TMemberInspector& insp, char* parent) static Int_t Sleep(ULong_t secs, ULong_t nanos = 0) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) static Int_t TryLock() static void** Tsd(void* dflt, Int_t k) static Int_t UnLock() static void XAction()

Data Members

    private:
TThread* fNext pointer to next thread TThread* fPrev pointer to prev thread TThread** fHolder pointer to holder of this (delete only) TThread::EPriority fPriority thread priority TThread::EState fState thread state TThread::EState fStateComing coming thread state Long_t fId thread id Long_t fJoinId thread id to whome can join Bool_t fDetached kTRUE if thread is Detached Bool_t fNamed kTRUE if thread is Named void *(*)(void*) fFcnRetn void* start function of thread void (*)(void*) fFcnVoid void start function of thread void* fThreadArg thread start function arguments void* fClean support of cleanup structure void* fTsd[20] thread specific data container char fComm[100] ???? static TThreadImp* fgThreadImp static pointer to thread implementation static char* fgXAct Action name to do by main thread static void** volatilefgXArr pointer to control array of void pointers for action static Int_t fgXAnb size of array above static Int_t fgXArt return XA flag static TThread* fgMain pointer to chain of TThread's static TMutex* fgMainMutex mutex to protect chain of threads static TMutex* fgXActMutex mutex to protect XAction static TCondition* fgXActCondi Condition for XAction public:
static const TThread::EPriority kLowPriority static const TThread::EPriority kNormalPriority static const TThread::EPriority kHighPriority static const TThread::EState kInvalidState static const TThread::EState kNewState static const TThread::EState kRunningState static const TThread::EState kTerminatedState static const TThread::EState kFinishedState static const TThread::EState kCancelingState static const TThread::EState kCanceledState static const TThread::EState kDeletingState

Class Description

                                                                      
 TThread                                                              
                                                                      
 This class implements threads. A thread is an execution environment  
 much lighter than a process. A single process can have multiple      
 threads. The actual work is done via the TThreadImp class (either    
 TPosixThread, TThreadSolaris or TThreadNT).                          
                                                                      


void Debu(const char *txt)

Int_t Exists()
 Check existing threads
 return number of running Threads

void SetPriority(EPriority pri)
 Set thread priority.

void SetJoinId(Long_t jid)
 Set id of thread to join.

void SetJoinId(TThread *tj)
 Set thread to join.

TThread* GetThread(Long_t id)
 Static method to find a thread by id.

TThread* GetThread(const char *name)
 Static method to find a thread by name.

TThread* Self()
 Static method returning pointer to current thred.

Long_t Join(void **ret)
 Static method to join thread. (rdm?)

TThread(void *(*fn)(void*), void *arg, EPriority pri)
 Create a thread. Specify the function or static class method
 to be executed by the thread, and a pointer to the argument structure.
 The user functions should return a void*.

TThread(void (*fn)(void*), void *arg, EPriority pri)
 Create a thread. Specify the function or class method
 to be executed by the thread, and a pointer to the argument structure.

TThread(Int_t id)
 Create a TThread for a already running thread

TThread(const char *thname, void *(*fn)(void*), void *arg, EPriority pri) : TNamed(thname, "")
 Create thread with a name. Specify the function or class method
 to be executed by the thread, and a pointer to the argument structure.

TThread(const char *thname, void (*fn)(void*), void *arg, EPriority pri) : TNamed(thname, "")
 Create thread with a name. Specify the function or class method
 to be executed by the thread, and a pointer to the argument structure.

void Constructor()
 Common thread constructor.

~TThread()

Int_t Delete(TThread *&th)

Long_t Join(Long_t jid, void **ret)

Long_t SelfId()

Int_t Run(void *arg)

Int_t Kill()

Int_t Kill(Long_t id)

Int_t Kill(const char *name)

Int_t SetCancelOff()

Int_t SetCancelOn()

Int_t SetCancelAsynchronous()

Int_t SetCancelDeferred()

Int_t CancelPoint()

Int_t CleanUpPush(void *free, void *arg)

Int_t CleanUpPop(Int_t exe)

Int_t CleanUp()

void AfterCancel(TThread *th)

Int_t Exit(void *ret)

Int_t Sleep(ULong_t secs, ULong_t nanos)

Int_t GetTime(ULong_t *absSec, ULong_t *absNanoSec)

Int_t Lock()

Int_t TryLock()

Int_t UnLock()

ULong_t Call(void *p2f,void *arg)

void* Fun(void *ptr)

void Ps()
 List existing threads.

void** Tsd(void *dflt,Int_t k)

void Printf(const char *txt)

void Printf(const char *txt, Long_t in)

Int_t XARequest(const char *xact, Int_t nb, void **ar, Int_t *iret)

void XAction()

Int_t MakeFun(char *funname)



Inline Functions


                      void PutComm(const char* txt = "0")
                     char* GetComm()
        TThread::EPriority GetPriority() const
           TThread::EState GetState() const
                    Long_t GetId() const
                      void ps()
                    Long_t GetJoindId() const
                     Int_t Delete(TThread*& th)
                      void Printf(const char* txt, void* i)
                   TClass* Class()
                   TClass* IsA() const
                      void ShowMembers(TMemberInspector& insp, char* parent)
                      void Streamer(TBuffer& b)
                      void StreamerNVirtual(TBuffer& b)


Author: Fons Rademakers 02/07/97
Last update: root/thread:$Name: $:$Id: TThread.cxx,v 1.17 2002/06/06 15:12:50 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.