Thread Class Reference
[PEARL.base]

Stores information related to a thread of the target application. More...

#include <Thread.h>

Inheritance diagram for Thread:

NamedObject IdObject

List of all members.

Public Member Functions

Constructors & destructor
 Thread (ident_t id, const std::string &name)
Get thread information
Processget_process () const
Locationget_location () const


Detailed Description

Instances of the class Thread provide information about to a single thread of execution in the target application. Each thread is bound to exactly one Process and corresponds to a unique Location.

The numerical identifiers of the individual threads are continuously enumerated, however, unlike the IDs of machines, nodes, and processes, thread IDs are not global but local to the process they belong to. For OpenMP applications, the thread identifier is equal to the thread number returned by omp_get_thread_num().


Constructor & Destructor Documentation

Thread ( ident_t  id,
const std::string &  name 
)

Creates a new instance and sets its identifier and name to the given values id and name, respectively.

Right after the initialization, the thread is not associated with any process or location.

Parameters:
id Thread identifier
name Thread name


Member Function Documentation

Location * get_location (  )  const

Returns the location associated to this thread. If the thread has not been bound to a location object yet, a NULL pointer is returned.

Returns:
Associated location

Process * get_process (  )  const

Returns the process this thread belongs to. If the thread has not been assigned to a process yet, a NULL pointer is returned.

Returns:
Associated process


SCALASCA    Copyright © 1998–2009 Forschungszentrum Jülich, Jülich Supercomputing Centre