TThread


class description - source file - inheritance tree

class TThread : public TNamed

    private:
static void AfterCancel(TThread* th) static unsigned long Call(void* p2f, void* arg) void Constructor() static void* Fun(void* ptr) char* GetComm() void PutComm(const char* txt = NULL) 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(const Text_t* 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) static Int_t Delete(TThread*& th) static Int_t Exists() static Int_t Exit(void* ret = 0) Int_t GetId() const Int_t GetJoindId() const TThread::EPriority GetPriority() const TThread::EState GetState() const static TThread* GetThread(Int_t id) static TThread* GetThread(const Text_t* name) static Int_t GetTime(ULong_t* absSec, ULong_t* absNanoSec) virtual TClass* IsA() const static Int_t Join(Int_t id, void** ret = 0) static Int_t Join(void** ret = 0) Int_t Kill() static Int_t Kill(Int_t id) static Int_t Kill(const Text_t* name) static Int_t Lock() static Int_t MakeFun(char* funname) static void Printf(const char* txt) static void Printf(const char* txt, Int_t i) static void Printf(const char* txt, void* i) void Ps() void ps() Int_t Run(void* arg = 0) static TThread* Self() static Int_t SelfId() static Int_t SetCancelAsynchronous() static Int_t SetCancelDeferred() static Int_t SetCancelOff() static Int_t SetCancelOn() void SetJoinId(TThread* tj) void SetJoinId(Int_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) 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 Int_t fId thread id Bool_t fDetached kTRUE if thread is Detached Bool_t fNamed kTRUE if thread is Named Int_t fJoinId thread id to whom can join 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    
 TThreadPosix, 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(Int_t jid)
 Set id of thread to join.

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

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

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

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

Int_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(const Text_t *thname, void *(*fn)(void*), void *arg, EPriority pri)
 Create thread with a name. For the ..... //till here

TThread(const Text_t *thname, void (*fn)(void*), void* arg, EPriority pri)

void Constructor()

~TThread()

Int_t Delete(TThread* &th)

Int_t Join(Int_t jid, void **ret)

Int_t SelfId()

Int_t Run(void *arg)

Int_t Kill()

Int_t Kill(Int_t id)

Int_t Kill(const Text_t *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()

void* Fun(void *ptr)

void Ps()

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

void Printf(const char *txt)

void Printf(const char *txt,Int_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


             unsigned long Call(void* p2f, void* arg)
                      void PutComm(const char* txt = NULL)
                     char* GetComm()
        TThread::EPriority GetPriority() const
           TThread::EState GetState() const
                     Int_t GetId() const
                      void ps()
                     Int_t GetJoindId() const
                      void Printf(const char* txt, void* i)
                   TClass* Class()
                   TClass* IsA() const
                      void ShowMembers(TMemberInspector& insp, char* parent)
                      void Streamer(TBuffer& b)


Author: Fons Rademakers 02/07/97
Last update: root/thread:$Name: $:$Id: TThread.cxx,v 1.4 2000/09/13 07:58:21 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.