|
Public Types |
| enum | state_t { Stopped,
Running,
Suspended
} |
| | Thread state. More...
|
Public Member Functions |
| | Thread () throw () |
| virtual | ~Thread () |
| void | start (Semaphore *sem=0, int prio=0) throw (LogicError, ThreadError) |
| | Start thread.
|
| bool | stop (unsigned int timeout) throw (LogicError, SyncError) |
| | Stop thread.
|
| void | kill () throw (LogicError, SystemError) |
| | Kill the thread.
|
| bool | suspend (unsigned int timeout) throw (LogicError, SyncError) |
| | Suspend threads execution.
|
| void | resume () throw (LogicError, SyncError) |
| | Resume threads execution.
|
| state_t | state () const throw () |
| | Returns the state of the thread.
|
Static Public Member Functions |
| void | yield () throw () |
| | Give up calling threads CPU time.
|
| void | sleep (unsigned int timeout) throw () |
| | Delay execution of calling thread.
|
| void | exit () throw () |
| | Terminate calling thread.
|
| Thread * | current () throw () |
| | Returns a pointer to the current thread.
|
Protected Member Functions |
| virtual bool | initial ()=0 |
| virtual void | main ()=0 |
| virtual void | suspended () |
| virtual void | resumed () |
| virtual void | final () |
| bool | testCancel () throw (LogicError, SyncError) |
| thread_handle_t * | handle () const throw () |
Static Protected Member Functions |
| thread_handle_t * | createHandle () |
| void | destroyHandle (thread_handle_t *handle) |
Friends |
| class | Private |
| struct | thread_handle_t |