ROOT logo
Gled » GLEDCORE » GThread

class GThread


 POSIX thread wrapper class - Gled specific as it provides
 data members required for authorization and MIR processing.

Function Members (Methods)

public:
GThread(const GThread&)
GThread(const Text_t* name, GThread_foo foo, void* arg = 0, bool detached = false)
virtual~GThread()
intCancel()
static GThread::CStateCancelOff()
static GThread::CStateCancelOn()
static TClass*Class()
intDetach()
static voidExit(void* ret = 0)
static voidFiniMain()
boolGetDetached()
void*GetEndArg()
GThread_cu_fooGetEndFoo()
pthread_tGetId()
intGetIndex()
static intGetMinStackSize()
const Text_t*GetName() const
intGetNice()
GThread::RStateGetRunningState()
intGetStackSize()
void*GetStartArg()
GThread_fooGetStartFoo()
static GThread*InitMain()
virtual TClass*IsA() const
intJoin(void** tret = 0)
intKill(GThread::Signal signal = SigSTOP)
static voidListThreads()
static ZMIR*MIR()
GThread&operator=(const GThread&)
static ZMirEmittingEntity*Owner()
static const char*RunningStateName(GThread::RState state)
static GThread*Self()
static GThread::CStateSetCancelState(GThread::CState s)
static GThread::CTypeSetCancelType(GThread::CType t)
voidSetEndArg(void* endarg)
voidSetEndFoo(GThread_cu_foo endfoo)
static voidSetMinStackSize(int ss)
voidSetName(const Text_t* s)
voidSetNice(int nice)
voidSetStackSize(int stacksize)
voidSetStartArg(void* startarg)
voidSetStartFoo(GThread_foo startfoo)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
intSpawn()
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
TStringStrName() const
static voidTestCancel()
private:
GThread(const Text_t* name)
ZMIR*get_mir() const
ZMirEmittingEntity*get_owner() const
voidset_mir(ZMIR* mir)
voidset_owner(ZMirEmittingEntity* owner)
static voidthread_reaper(void* arg)
static void*thread_spawner(void* arg)

Data Members

public:
enum CState { CS_Enable
CS_Disable
};
enum CType { CT_Async
CT_Deferred
};
enum Signal { SigHUP
SigINT
SigQUIT
SigILL
SigTRAP
SigABRT
SigIOT
SigBUS
SigFPE
SigKILL
SigUSR1
SigSEGV
SigUSR2
SigPIPE
SigALRM
SigTERM
SigSTKFLT
SigCLD
SigCHLD
SigCONT
SigSTOP
SigTSTP
SigTTIN
SigTTOU
SigURG
SigXCPU
SigXFSZ
SigVTALRM
SigPROF
SigWINCH
SigPOLL
SigIO
SigPWR
SigUNUSED
};
enum RState { RS_Incubating
RS_Spawning
RS_Running
RS_Terminating
RS_Finished
RS_ErrorSpawning
};
private:
static unsigned intTSD_Self
boolbDetachedX{g}
void*mEndArgX{gs}
GThread_cu_foomEndFooX{gs}
pthread_tmIdX{g} This will become GThreadInternalRep*
intmIndexX{g}
ZMIR*mMIR
TStringmNameX{Gs}
intmNiceX{gs}
ZMirEmittingEntity*mOwner
GThread::RStatemRunningStateX{g}
intmStackSizeX{gs}
void*mStartArgX{gs}
GThread_foomStartFooX{gs}
list<GThread*,allocator<GThread*> >::iteratormThreadListIt
static GMutexsContainerLock
static boolsMainInitDone
static GThread*sMainThread
static intsMinStackSize
static intsThreadCount
static list<GThread*>sThreadList
static map<unsigned long,GThread*>sThreadMap

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

GThread(const Text_t* name)
 Private constructor for wrapping of existing threads.
 Thread is put into 'Running' state, registered into the thread list
 and assigned an internal thread-index.
 The owner of the thread is set to 0.
GThread(const Text_t* name, GThread_foo foo, void* arg = 0, bool detached = false)
 Normal constructor.
 Thread is put into 'Incubating' state, registered into the thread list
 and assigned an internal thread-index.
 The owner of the thread is set be the same as the owner of the calling thread.
~GThread()
 Destructor.
 Thread is unregistered from the thread list.
void* thread_spawner(void* arg)
void thread_reaper(void* arg)
int Spawn()
int Join(void** tret = 0)
int Kill(GThread::Signal signal = SigSTOP)
int Cancel()
int Detach()
void TestCancel()
void Exit(void* ret = 0)
GThread* Self()
 Static - returns current thread.
ZMirEmittingEntity* Owner()
 Static - returns owner of current thread.
ZMIR* MIR()
 Static - returns MIR processed in current thread.
const char* RunningStateName(GThread::RState state)
void ListThreads()
GThread* InitMain()
 This will create a GThread wrapper around the calling thread.
 To be called from ::main thread, somewhere early during the
 system initialization.
void FiniMain()
int GetMinStackSize()
void SetMinStackSize(int ss)
void set_owner(ZMirEmittingEntity* owner)
{ mOwner = owner; }
ZMirEmittingEntity* get_owner() const
{ return mOwner; }
void set_mir(ZMIR* mir)
{ mMIR = mir; }
ZMIR* get_mir() const
{ return mMIR; }
GThread(const Text_t* name)
CState SetCancelState(GThread::CState s)
CState CancelOn()
CState CancelOff()
CType SetCancelType(GThread::CType t)