#include <ThreadContext.hpp>
Inheritance diagram for corelinux::ThreadContext
Public Methods | |
ThreadContext ( CallerFunctionPtr ) throw ( Assertion ) | |
Default constructor only requires a caller entry point function. More... | |
ThreadContext ( CallerFunctionPtr, Size ) throw ( Assertion ) | |
Constructor which allows the caller to define the stack. More... | |
ThreadContext ( ThreadContextCref ) throw ( Assertion ) | |
Copy constructor takes information from the context argument. More... | |
virtual | ~ThreadContext ( void ) |
Virtual destructor. | |
ThreadContextRef | operator= ( ThreadContextCref ) throw ( Assertion ) |
Assignment operator for designating thread identity. More... | |
bool | operator== ( ThreadContextCref ) const |
Equality matches the thread identifiers. More... | |
bool | operator== ( ThreadIdentifierCref ) const |
Equality matches the thread identifiers. More... | |
bool | operator== ( CallerFunctionPtr ) const |
Equality operator matches the callers function. More... | |
operator ThreadIdentifierCref ( void ) const | |
Coerces ThreadContext to ThreadIdentifier. More... | |
const ThreadState& | getState ( void ) const |
Get the state of the thread as reflected in its context. More... | |
Size | getStackSize ( void ) const |
Get the size of the stack as defined by the context constructor. More... | |
Int | getShareMask ( void ) const |
Get the share mask for the thread which determines VM, FILES, FILESYSTEM, SIGNAL shares. More... | |
Int | getReturnCode ( void ) const |
Return the code returned by the callers function. More... | |
ThreadIdentifierCref | getIdentifier ( void ) const |
Get the identifier for the thread. More... | |
virtual ThreadFrameFunctionPtr | getFramePointer ( void ) |
Get the thread frame function pointer. More... | |
BytePtr | getStack ( void ) |
Get the stack pointer. | |
BytePtr* | getStackTop ( void ) |
Get the top of stack pointer. | |
void | setShareMask ( Int ) |
Change the sharing mask for the thread. More... | |
void | setFrameFunction ( ThreadFrameFunctionPtr ) |
Allows the caller to substitute the thread frame entry point. More... | |
void | setContextFunctions ( ThreadContextCreatePtr , ThreadContextDestroyPtr ) |
Allows the caller to substitute the routines which create and destroy the managed ThreadContext object. More... | |
void | setStackFunctions ( ThreadStackCreatePtr , ThreadStackDestroyPtr ) |
Allows the caller to substitute the routines which create and destroy the managed ThreadContext stack object. More... | |
void | setReturnCode ( Int ) |
Set the return code for the thread. More... | |
void | setThreadState ( ThreadState ) |
Set the state for the thread. More... | |
ThreadContextPtr | createContext ( void ) throw ( ThreadException ) |
Create a instance of ourself, we also invoke the create stack method so the instance is ready to be used to run a thread. More... | |
void | destroyContext ( ThreadContextPtr ) throw ( Assertion ) |
Destroys the context instance. More... | |
Static Public Methods | |
Int | cloneFrameFunction ( ThreadContextPtr ) |
The definitive thread frame entry point. More... | |
Protected Methods | |
ThreadContext ( void ) throw ( Assertion ) | |
Default constructor throws NEVER_GET_HERE. | |
ThreadContextRef | operator= ( ThreadIdentifier ) |
Assignment operator for designating thread identity. More... | |
CallerFunctionPtr | getCallerFunction ( void ) |
Return the function pointer of the callers thread routine. More... |
Included are stack resource, shared address space flags, factory methods, and state indicators.
|
Default constructor only requires a caller entry point function. Defaults in effect are 8k stack which is allocated by the system, and all resources of the caller are shared by the new thread.
|
|
Constructor which allows the caller to define the stack. All resources of the caller are shared by the new thread.
|
|
Copy constructor takes information from the context argument.
|
|
The definitive thread frame entry point. This is the address that "clone" gets.
|
|
Create a instance of ourself, we also invoke the create stack method so the instance is ready to be used to run a thread.
|
|
Destroys the context instance. A check is made to insure it is not a suicide.
|
|
Return the function pointer of the callers thread routine.
|
|
Get the thread frame function pointer.
|
|
Get the identifier for the thread. This is only valid once a thread is started
|
|
Return the code returned by the callers function. This is only valid if the thread ended normally
|
|
Get the share mask for the thread which determines VM, FILES, FILESYSTEM, SIGNAL shares.
|
|
Get the size of the stack as defined by the context constructor.
|
|
Get the state of the thread as reflected in its context.
|
|
Coerces ThreadContext to ThreadIdentifier.
|
|
Assignment operator for designating thread identity.
|
|
Assignment operator for designating thread identity.
|
|
Equality operator matches the callers function.
|
|
Equality matches the thread identifiers.
|
|
Equality matches the thread identifiers.
|
|
Allows the caller to substitute the routines which create and destroy the managed ThreadContext object. The call to create the object comes in at the startThread prior to stack allocation, the call to destroy the object comes from startThread exception and error handling, or when requested by the caller.
|
|
Allows the caller to substitute the thread frame entry point.
|
|
Set the return code for the thread.
|
|
Change the sharing mask for the thread. This is only effective when set prior to starting the thread.
|
|
Allows the caller to substitute the routines which create and destroy the managed ThreadContext stack object. The call to create the stack object comes in at the startThread prior to threading, the call to destroy the object comes from startThread exception and error handling, or when the destruction of the ThreadContext is imanent.
|
|
Set the state for the thread.
|