Return the hzProcess instance applicable to the current thread Arguments: None Pointer to the process information of the current thread
| Return Type | Function name | Arguments |
|---|---|---|
| hzProcess* | GetThreadInfo | (void) |
Declared in file: hzProcess.h
Defined in file : hzProcess.cpp
Function Logic:
Function body:
hzProcess* GetThreadInfo (void)
{
// Category: Process
//
// Return the hzProcess instance applicable to the current thread
//
// Arguments: None
// Returns: Pointer to the process information of the current thread
hzProcess* phz ; // Thread
pthread_t tid ; // Current thread id
uint32_t n ; // Thread iterator
tid = pthread_self() ;
for (n = 0; n < s_num_threads ; n++)
{
phz = s_actThreadReg[n] ;
if (tid == phz->GetTID())
return phz ;
}
return 0;
}