Test application.
More...
#include <user/app1/appl.h>
|
| | Application () |
| | Constructor. More...
|
| |
| void | action () override |
| | Contains the application code. More...
|
| |
| | Thread () |
| | Constructor Initializes the context using prepareContext with the highest aligned address of the reserved_stack_space array as stack pointer (top of stack). Furthermore, assign each thread a unique id using a global variable idCounter. You have to declare and initialize it properly. More...
|
| |
| void | go () |
| | Activates the first thread on this CPU. More...
|
| |
| void | resume (Thread *next) |
| | Switches from the currently running thread to the next one. More...
|
| |
| virtual void | action ()=0 |
| | Method that contains the thread's program code. More...
|
| |
|
|
const size_t | id |
| | Unique ID of thread.
|
| |
|
volatile bool | kill_flag |
| | Marker for a dying thread.
|
| |
|
static const size_t | STACK_SIZE = 4096 |
| | Stack size for each thread.
|
| |
| static void | kickoff (Thread *object) |
| | Function to start a thread. More...
|
| |
|
StackPointer | stackpointer |
| | Current stack pointer of thread for context switch.
|
| |
Test application.
Usually it is sufficient to increment and output a number endlessly in a loop.
- Note
- Any class derived from Thread defines an application for StuBS.
- Todo:
- Application should inherit from Thread
◆ Application()
| Application::Application |
( |
| ) |
|
|
inline |
Constructor.
- Todo:
- Implement Constructor
◆ action()
| void Application::action |
( |
| ) |
|
|
overridevirtual |
Contains the application code.
- Todo:
- Implement Method
Implements Thread.
The documentation for this class was generated from the following files:
- user/app1/appl.h
- user/app1/appl.cc