ooRexx  4.2.0-source
About: ooRexx (Open Object Rexx) is a free implementation of Object Rexx. Object Rexx is an enhancement of the classic Rexx interpreter; a full-featured programming language with a human-oriented syntax.
  Fossies Dox: ooRexx-4.2.0-source.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

SysActivity Class Reference

#include <SysActivity.hpp>

Public Member Functions

 SysActivity ()
 
bool equals (thread_id_t t)
 
void create (RexxActivity *activity, size_t stackSize)
 
void close ()
 
void useCurrentThread ()
 
char * getStackBase (size_t stackSize)
 
void setPriority (int p)
 
bool validateThread ()
 
thread_id_t getThreadID ()
 

Static Public Member Functions

static thread_id_t queryThreadID ()
 
static void yield ()
 

Protected Attributes

pthread_t threadId
 

Detailed Description

Definition at line 73 of file SysActivity.hpp.

Constructor & Destructor Documentation

◆ SysActivity()

SysActivity::SysActivity ( )
inline

Definition at line 76 of file SysActivity.hpp.

Member Function Documentation

◆ close()

void SysActivity::close ( )

Close out any resources required by this thread descriptor.

Definition at line 69 of file SysActivity.cpp.

References threadId.

Referenced by RexxActivity::cleanupActivityResources().

◆ create()

void SysActivity::create ( RexxActivity activity,
size_t  stackSize 
)

Create a new thread for an activity.

Parameters
activityThe activity that will run on this thread.
stackSizeThe desired stack size.

Definition at line 80 of file SysActivity.cpp.

References Error_System_service_service, reportException(), threadFnc(), and threadId.

Referenced by RexxActivity::RexxActivity().

◆ equals()

bool SysActivity::equals ( thread_id_t  t)
inline

Definition at line 77 of file SysActivity.hpp.

References threadId.

Referenced by RexxActivity::isThread().

◆ getStackBase()

char * SysActivity::getStackBase ( size_t  stackSize)

Return the pointer to the base of the current stack. This is used for checking recursion overflows.

Returns
The character pointer for the stack base.

Definition at line 163 of file SysActivity.cpp.

Referenced by RexxActivity::RexxActivity(), RexxActivity::run(), and RexxActivity::runThread().

◆ getThreadID()

thread_id_t SysActivity::getThreadID ( )
inline

Definition at line 84 of file SysActivity.hpp.

References threadId.

Referenced by RexxActivity::threadIdMethod().

◆ queryThreadID()

thread_id_t SysActivity::queryThreadID ( )
static

Get the ID of the current thread.

Returns
The thread identifer for the current thread.

Definition at line 127 of file SysActivity.cpp.

Referenced by ActivityManager::findActivity(), and InterpreterInstance::findActivity().

◆ setPriority()

void SysActivity::setPriority ( int  p)

◆ useCurrentThread()

void SysActivity::useCurrentThread ( )

Initialize the descriptor for manipulating the current active thread.

Definition at line 150 of file SysActivity.cpp.

References threadId.

Referenced by RexxActivity::RexxActivity().

◆ validateThread()

bool SysActivity::validateThread ( )

Check if this activity is getting used on the correct thread.

Returns
true if the current thread is the same as the one the activity was created for.

Definition at line 140 of file SysActivity.cpp.

References threadId.

Referenced by RexxActivity::validateThread().

◆ yield()

static void SysActivity::yield ( )
inlinestatic

Definition at line 88 of file SysActivity.hpp.

Referenced by ActivityManager::addWaitingActivity(), and RexxActivity::run().

Member Data Documentation

◆ threadId

pthread_t SysActivity::threadId
protected

Definition at line 94 of file SysActivity.hpp.

Referenced by close(), create(), equals(), getThreadID(), useCurrentThread(), and validateThread().


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