ldas-tools-al 2.6.4
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LDASTools::AL::SystemCallTask Class Referenceabstract

Perform a system call within a thread. More...

#include <SystemCallTask.hh>

Inheritance diagram for LDASTools::AL::SystemCallTask:
Inheritance graph
[legend]
Collaboration diagram for LDASTools::AL::SystemCallTask:
Collaboration graph
[legend]

Public Types

typedef Thread::signal_type signal_type
 Data class for passing signal information.
 
typedef Thread::signal_type signal_type
 Data class for passing signal information.
 

Public Member Functions

 SystemCallTask ()
 Constructor.
 
 SystemCallTask ()
 Constructor.
 
int SystemErrNo () const
 Return the thread specific value of errno.
 
int SystemErrNo () const
 Return the thread specific value of errno.
 
int SystemReturnCode () const
 Return the return code of the system call.
 
int SystemReturnCode () const
 Return the return code of the system call.
 
MutexLock::baton_type Baton () const
 Retrieve baton to gain exclusive access.
 
MutexLock::baton_type Baton () const
 Retrieve baton to gain exclusive access.
 
cancel_method CancelMethod () const
 Retrieve method to use for terminating the task.
 
cancel_method CancelMethod () const
 Retrieve method to use for terminating the task.
 
signal_type CancelSignal () const
 Retrieve signal to use for terminating the task.
 
signal_type CancelSignal () const
 Retrieve signal to use for terminating the task.
 
bool DeleteOnCompletion () const
 Retrieve state information concearning deletion.
 
bool DeleteOnCompletion () const
 Retrieve state information concearning deletion.
 
virtual void OnCompletion (int TaskThreadState)
 Action to be done when task completes.
 
virtual void OnCompletion (int TaskThreadState)
 Action to be done when task completes.
 
name_type TaskName () const
 Get the name of the current task.
 
name_type TaskName () const
 Get the name of the current task.
 

Protected Member Functions

virtual int eval ()=0
 Action to be performed.
 
virtual int eval ()=0
 Action to be performed.
 

Protected Attributes

int m_returnCode
 Return code of the system call.
 
int m_errNo
 Thread specific value of errno at time of exit.
 

Detailed Description

Perform a system call within a thread.

This is an abstract class that should be used as the base for a class that is to perform some system call usually within a thread.

Constructor & Destructor Documentation

◆ SystemCallTask()

LDASTools::AL::SystemCallTask::SystemCallTask ( )

Constructor.

Because system calls can be very peristant within a thread context, system calls are set up to background without a reaper to prevent resource starvation for the rest of the code.

Member Function Documentation

◆ CancelMethod() [1/2]

Task::cancel_method LDASTools::AL::Task::CancelMethod ( ) const
inherited

Retrieve method to use for terminating the task.

Returns
The method to be used to terminate the task.

◆ CancelMethod() [2/2]

cancel_method LDASTools::AL::Task::CancelMethod ( ) const
inherited

Retrieve method to use for terminating the task.

Returns
The method to be used to terminate the task.

◆ CancelSignal() [1/2]

Task::signal_type LDASTools::AL::Task::CancelSignal ( ) const
inherited

Retrieve signal to use for terminating the task.

Returns
The signal to be used to terminate the task.

◆ CancelSignal() [2/2]

signal_type LDASTools::AL::Task::CancelSignal ( ) const
inherited

Retrieve signal to use for terminating the task.

Returns
The signal to be used to terminate the task.

◆ DeleteOnCompletion() [1/2]

bool LDASTools::AL::Task::DeleteOnCompletion ( ) const
inherited

Retrieve state information concearning deletion.

Returns
True if the task should be deleted once terminated.

◆ DeleteOnCompletion() [2/2]

bool LDASTools::AL::Task::DeleteOnCompletion ( ) const
inherited

Retrieve state information concearning deletion.

Returns
True if the task should be deleted once terminated.

◆ OnCompletion()

void LDASTools::AL::Task::OnCompletion ( int  TaskThreadState)
virtualinherited

Action to be done when task completes.

This function is called regardless of why the task was terminated. It allows for any special cleanup or other action that needs to happen at the end of a task regardless of why the task terminated.

Member Data Documentation

◆ m_errNo

int LDASTools::AL::SystemCall::m_errNo
protectedinherited

Thread specific value of errno at time of exit.

This allows for the thread specific errno value to be known outside of the calling thread. It is most benificial for error recovery as some conditions should cause a retry.

◆ m_returnCode

int LDASTools::AL::SystemCall::m_returnCode
protectedinherited

Return code of the system call.

This is the return code returned by the system call as defined by the system call's documentation.


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