Public Types | |
| enum | { HIGH = 1, NORMAL = 15, LOW = 63, IDLE = 127 } |
| enum | ThreadState { RUNNING, READY, SUSPENDED, FINISHING, DESTROYED } |
| enum | ThreadType { JOINABLE, DETACHED } |
| typedef short | State |
| typedef short | Priority |
Public Member Functions | |
| Thread (int(*entry)(), const State &state=READY, const Priority &priority=NORMAL, unsigned int stack_size=STACK_SIZE) | |
| template<class T1 > | |
| Thread (int(*entry)(T1 a1), T1 a1, const State &state=READY, const Priority &priority=NORMAL, unsigned int stack_size=STACK_SIZE) | |
| template<class T1 , class T2 > | |
| Thread (int(*entry)(T1 a1, T2 a2), T1 a1, T2 a2, const State &state=READY, const Priority &priority=NORMAL, unsigned int stack_size=STACK_SIZE) | |
| template<class T1 , class T2 , class T3 > | |
| Thread (int(*entry)(T1 a1, T2 a2, T3 a3), T1 a1, T2 a2, T3 a3, const State &state=READY, const Priority &priority=NORMAL, unsigned int stack_size=STACK_SIZE) | |
| volatile const State & | state () const |
| volatile const Priority & | priority () const |
| void | priority (const Priority &priority) |
| int | join () |
| void | pass () |
| void | suspend () |
| void | resume () |
| void | addSemaphore (Semaphore *semaphore) |
| void | removeSemaphore (Semaphore *semaphore) |
Static Public Member Functions | |
| static void | yield () |
| static void | exit (int status=0) |
| static Thread *volatile | running () |
| static int | init (System_Info *si) |
| static void | idle () |
Private Types | |
| typedef Queue< Thread > | Queue |
| typedef CPU::Log_Addr | Log_Addr |
| typedef CPU::Context | Context |
Private Member Functions | |
| void | header (Log_Addr entry, unsigned int stack_size) |
| void | body () |
| void | releaseSemaphores () |
Static Private Member Functions | |
| static void | implicit_exit () |
Private Attributes | |
| Log_Addr | _stack |
| Context *volatile | _context |
| volatile State | _state |
| volatile Priority | _priority |
| Queue::Element | _link |
| CircularVector< Semaphore * > | _semaphores |
| Thread * | _waitingThread |
Static Private Attributes | |
| static const Type_Id | TYPE = Type<Thread>::TYPE |
| static const unsigned int | STACK_SIZE |
Friends | |
| class | Scheduler |
Definition at line 26 of file thread.h.
| Thread::Thread | ( | int(*)() | entry, | |
| const State & | state = READY, |
|||
| const Priority & | priority = NORMAL, |
|||
| unsigned int | stack_size = STACK_SIZE | |||
| ) | [inline] |
CircularVector<Semaphore *> Thread::_semaphores [private] |
const unsigned int Thread::STACK_SIZE [static, private] |
1.5.8