#include <Thread.hpp>
Inheritance diagram for corelinux::Thread:
Public Member Functions | |
Thread (void) throw ( Assertion ) | |
Default constructor. | |
virtual | ~Thread (void) |
Virtual destructor. | |
Static Public Member Functions | |
static Int | getKernelError (void) |
getKernelError returns the thread instance errno for the last kernel call the thread made | |
static ThreadIdentifier | getThreadIdentifier (void) |
getThreadIdentifier retrieves the kernel process id for the caller thread | |
static ThreadIdentifier | getParentThreadIdentifier (void) |
getParentThreadIdentifier retrieves the parent thread of the current thread. | |
static ThreadIdentifierCref | getThreadManagerIdentifier (void) |
getThreadManagerIdentifier retrieves the thread that Thread was instantiated from | |
static ThreadContextCref | getThreadContext (ThreadIdentifierCref) throw ( InvalidThreadException ) |
Retrieve a ThreadContext given a identifier. | |
static Count | getCreatedThreadCount (void) |
Retrieve the number of created threads. | |
static Count | getActiveThreadCount (void) |
Retrieve the number of threads that are starting or running. | |
static Count | getBlockedThreadCount (void) |
Retrieve the number of threads that are waiting ro tun. | |
static Count | getCompletedThreadCount (void) |
Retrieve the number of threads that are not starting or running or waiting to run. | |
static void | dump (void) |
Debugging method for the moment. | |
static ThreadIdentifier | startThread (ThreadContextRef) |
Start a thread as described by the context. | |
static Int | waitForThread (ThreadIdentifierCref) throw ( InvalidThreadException ) |
Blocks the caller until the thread has ended execution, retrieving the return code from the associated thread context. | |
static void | destroyThreadContext (ThreadIdentifierCref) throw ( InvalidThreadException, Assertion ) |
Destroys the managed context for the given identifier. | |
static Int | getThreadPriority (ThreadIdentifierCref) throw ( InvalidThreadException, Assertion ) |
Get thread priority for the given indentifier. | |
static void | setThreadPriority (ThreadIdentifierCref, Int) throw ( InvalidThreadException, Assertion ) |
Set thread priority for the given indentifier. | |
Protected Member Functions | |
Thread (ThreadCref) throw ( Assertion ) | |
Copy constructor won't do, its a singleton. | |
ThreadRef | operator= (ThreadCref) throw ( Assertion ) |
Assignment operator won't do, we should never get here anyway but the compiler will generate the missing method. | |
bool | operator== (ThreadCref) const throw ( Assertion ) |
Equality operator not valid for class utility. | |
Static Protected Member Functions | |
static void | threadTerminated (Int, VoidPtr, VoidPtr) |
Static Protected Attributes | |
static ThreadManager | theThreadManager |
The singleton instance of Thread for synchronization. |
It accomplishes this by allowing the caller to setup a context for execution and calling their defined entry point. There is still much work to be done such as:
|
Copy constructor won't do, its a singleton.
|
|
Destroys the managed context for the given identifier.
|
|
Retrieve the number of threads that are starting or running.
|
|
Retrieve the number of threads that are waiting ro tun.
|
|
Retrieve the number of threads that are not starting or running or waiting to run.
|
|
Retrieve the number of created threads.
|
|
getKernelError returns the thread instance errno for the last kernel call the thread made
|
|
getParentThreadIdentifier retrieves the parent thread of the current thread.
|
|
Retrieve a ThreadContext given a identifier.
|
|
getThreadIdentifier retrieves the kernel process id for the caller thread
|
|
getThreadManagerIdentifier retrieves the thread that Thread was instantiated from
|
|
Get thread priority for the given indentifier.
|
|
Assignment operator won't do, we should never get here anyway but the compiler will generate the missing method.
|
|
Equality operator not valid for class utility.
|
|
Set thread priority for the given indentifier.
|
|
Start a thread as described by the context.
|
|
Blocks the caller until the thread has ended execution, retrieving the return code from the associated thread context.
|