Rudiments
|
Public Member Functions | |
thread () | |
virtual | ~thread () |
bool | setStackSize (size_t stacksize) |
bool | getStackSize (size_t *stacksize) |
bool | spawn (void *(*function)(void *), void *arg, bool detached) |
void | exit (int32_t *status) |
bool | wait (int32_t *status) |
bool | detach () |
bool | raiseSignal (int32_t signum) |
void | retryFailedSpawn () |
void | dontRetryFailedSpawn () |
bool | getRetryFailedSpawn () |
Static Public Member Functions | |
static bool | supported () |
The thread class provides a simple thread implementation.
thread::thread | ( | ) |
Creates an instance of the thread class.
|
virtual |
Deletes this instance of the thread class.
bool thread::detach | ( | ) |
void thread::dontRetryFailedSpawn | ( | ) |
void thread::exit | ( | int32_t * | status | ) |
bool thread::getRetryFailedSpawn | ( | ) |
Returns true if failed spawn() calls will be retried and false otherwise.
bool thread::getStackSize | ( | size_t * | stacksize | ) |
Sets "stacksize" to this thread's stack size. Returns true on success and false if an error occurred.
bool thread::raiseSignal | ( | int32_t | signum | ) |
Sends signal "signum" to the thread.
void thread::retryFailedSpawn | ( | ) |
bool thread::setStackSize | ( | size_t | stacksize | ) |
Sets this thread's stack size to "stacksize". Returns true on success and false if an error occurred.
Starts a new thread by running whatever function was set by the setFunction() method and passing that function whatever argument was set by the setArgument() method. Returns true on success and false if an error occurred.
|
static |
Returns true if the platform supports threads and rudiments was built with thread support and false otherwise.