PiImageStreamer
Loading...
Searching...
No Matches
SWE4211RPi::GenericThreadInfo Class Reference

Diagnostic record for a thread that was not created by a RunnableClass. More...

#include <GenericThreadInfo.h>

Inheritance diagram for SWE4211RPi::GenericThreadInfo:
Collaboration diagram for SWE4211RPi::GenericThreadInfo:

Public Member Functions

 GenericThreadInfo (std::string threadName, pid_t myThreadID)
 
virtual ~GenericThreadInfo ()
 
void run () final
 
- Public Member Functions inherited from SWE4211RPi::RunnableClass
 RunnableClass (std::string threadName, int priority=0)
 
virtual ~RunnableClass ()
 
virtual void resetThreadDiagnostics ()
 
virtual void printInformation ()
 
virtual double getCPUUsageInfo ()
 
virtual pid_t getThreadID ()
 
virtual void start () final
 
virtual void setPriority (int priority) final
 
virtual int getPriority () final
 
virtual bool isShutdown () final
 
virtual bool isStarted () final
 
virtual void stopThreadExecution ()
 
virtual void waitForShutdown ()
 

Additional Inherited Members

- Static Public Member Functions inherited from SWE4211RPi::RunnableClass
static void printThreads ()
 
static void resetAllThreadInformation ()
 
- Protected Member Functions inherited from SWE4211RPi::RunnableClass
virtual void startChildRunnables ()
 
virtual void stopChildRunnables ()
 
- Protected Attributes inherited from SWE4211RPi::RunnableClass
std::thread * myThread = NULL
 
pthread_t executingThread = 0
 
pid_t myOSThreadID = 0
 
std::string myName
 
std::atomic< bool > keepGoing {true}
 
std::atomic< bool > runCompleted {false}
 
std::atomic< bool > runStarted {false}
 
int priority = -1
 
- Static Protected Attributes inherited from SWE4211RPi::RunnableClass
static std::list< RunnableClass * > runningThreads
 

Detailed Description

Diagnostic record for a thread that was not created by a RunnableClass.

Constructor & Destructor Documentation

◆ GenericThreadInfo()

GenericThreadInfo::GenericThreadInfo ( std::string  threadName,
pid_t  myThreadID 
)

This is the default constructor for the class. It records the thread ID and reads the thread's current real time priority from the operating system.

Parameters
threadNameThis is the name of the thread in a human readable format.
myThreadIDThis is the operating system thread ID (tid) of the thread.

This is the default constructor for the class. It records the thread ID and reads the thread's current real time priority with the sched_getattr system call. struct sched_attr is provided by sched.h in glibc 2.41 and later.

Parameters
threadNameThis is the name of the thread in a human readable format.
myThreadIDThis is the operating system thread ID (tid) of the thread.

◆ ~GenericThreadInfo()

GenericThreadInfo::~GenericThreadInfo ( )
virtual

This is the destructor. Note that it does not remove the instance from the list of threads.

Member Function Documentation

◆ run()

void GenericThreadInfo::run ( )
finalvirtual

This is the run method for the class. It does nothing, as the instance is never started.

This is the run method for the class.

Implements SWE4211RPi::RunnableClass.


The documentation for this class was generated from the following files: