ThreadInfo Class Reference

#include <Process.h>

Collaboration diagram for ThreadInfo:

Collaboration graph
[legend]

Public Member Functions

void init ()
void print ()

Data Fields

pid_t pid_
pthread_t thrid_
ThreadTrans thrTrans_ [MAX_THREADS_PER_PROCESS]
Mutexwant_
Mutexhas_ [MAX_MUTEX_PER_THREAD]

Detailed Description

Definition at line 45 of file Process.h.


Member Function Documentation

void ThreadInfo::init (  ) 

Definition at line 31 of file Process.cxx.

References has_, MAX_MUTEX_PER_THREAD, MAX_THREADS_PER_PROCESS, pid_, thrid_, thrTrans_, and want_.

Referenced by ProcessManager::registerThread().

00032 {
00033     pid_ = 0;
00034     thrid_ =0;
00035     want_ = NULL;
00036     for (int i =0; i <MAX_MUTEX_PER_THREAD; i++) has_[i] = NULL;
00037     for (int i =0; i <MAX_THREADS_PER_PROCESS; i++)  thrTrans_[i].init();
00038 }

Here is the caller graph for this function:

void ThreadInfo::print (  ) 

Definition at line 48 of file Process.cxx.

References has_, MAX_MUTEX_PER_THREAD, MAX_THREADS_PER_PROCESS, pid_, thrid_, thrTrans_, and want_.

Referenced by ProcessManager::printDebugInfo().

00049 {
00050     printf("<THREADINFO>\n");
00051     printf("  <PID> %d </PID>\n", pid_);
00052     printf("  <THRID> %lu </THRID>\n", thrid_);
00053     printf("  <WAIT> %x </WAIT>\n", want_);
00054     printf("  <MUTEXLIST>\n");
00055     for (int i =0; i <MAX_MUTEX_PER_THREAD; i++) if (has_[i]) printf("    <MUTEX> %x </MUTEX>\n", has_[i]);
00056     printf("  </MUTEXLIST>\n");
00057     printf("  <TRANSLIST>\n");
00058     for (int i =0; i <MAX_THREADS_PER_PROCESS; i++) thrTrans_[i].print();
00059     printf("  </TRANSLIST>\n");
00060     printf("</THREADINFO>\n");
00061 
00062 }

Here is the caller graph for this function:


Field Documentation

Mutex* ThreadInfo::has_[MAX_MUTEX_PER_THREAD]

Definition at line 57 of file Process.h.

Referenced by ProcessManager::addMutex(), ProcessManager::deregisterThread(), init(), print(), releaseAllResources(), and ProcessManager::removeMutex().

pid_t ThreadInfo::pid_

Definition at line 49 of file Process.h.

Referenced by cleanupDeadProcs(), init(), ProcessManager::isAnyOneRegistered(), logActiveProcs(), print(), ProcessManager::printDebugInfo(), ProcessManager::printUsageStatistics(), ProcessManager::registerThread(), and releaseAllResources().

pthread_t ThreadInfo::thrid_

Definition at line 51 of file Process.h.

Referenced by init(), logActiveProcs(), print(), ProcessManager::registerThread(), and releaseAllResources().

ThreadTrans ThreadInfo::thrTrans_[MAX_THREADS_PER_PROCESS]

Definition at line 53 of file Process.h.

Referenced by ProcessManager::getThreadTransaction(), ProcessManager::getThreadTransAddr(), init(), print(), and ProcessManager::setThreadTransaction().

Mutex* ThreadInfo::want_

Definition at line 55 of file Process.h.

Referenced by ProcessManager::deregisterThread(), init(), and print().


The documentation for this class was generated from the following files:
Generated on Mon Jun 9 22:54:13 2008 for csql by  doxygen 1.4.7