fake fake is missing
This commit is contained in:
4
main.cc
4
main.cc
@@ -110,7 +110,7 @@ extern "C" int main() {
|
||||
Context test1;
|
||||
uint8_t test1_stack[256];
|
||||
|
||||
prepareContext(test1_stack, test1, (void (*)(void *))&test_func1);
|
||||
prepareContext(test1_stack, test1, (void(*)(void*)) &(Application::kickoff));
|
||||
context_launch(&test1);
|
||||
|
||||
//Application{}.action();
|
||||
@@ -131,7 +131,7 @@ extern "C" int main_ap() {
|
||||
DBG << "App CPU " << static_cast<int>(Core::getID()) << endl << flush;
|
||||
|
||||
//assert(Core::getID() != 1);
|
||||
Application{}.action();
|
||||
//Application{}.action();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
// Alias to simplify stuff
|
||||
typedef void (*kickoff_t)(void*);
|
||||
|
||||
void Thread::kickoff(Thread* object) { (void)object; }
|
||||
void Thread::kickoff(Thread* object) {
|
||||
Guard::leave();
|
||||
object->action(); }
|
||||
|
||||
Thread::Thread(void* tos) { (void)tos; }
|
||||
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
#include "../arch/context.h"
|
||||
#include "../object/queue.h"
|
||||
#include "../types.h"
|
||||
|
||||
#include "../interrupt/guard.h"
|
||||
/*! \brief The Thread is an object used by the scheduler.
|
||||
* \ingroup thread
|
||||
*/
|
||||
class Thread {
|
||||
protected:
|
||||
public:
|
||||
/*! \brief The thread's entry point.
|
||||
*
|
||||
* For the first activation of a thread, we need a "return address"
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
#pragma once
|
||||
#include "../../types.h"
|
||||
|
||||
#include "../../thread/thread.h"
|
||||
//! \brief Test application
|
||||
//!
|
||||
//! \todo(12) Create a test application
|
||||
//! \todo(14) Application should inherit from \ref Thread
|
||||
//! \todo(16) Make some noise using the \ref PIT::pcspeaker "PC Speaker"
|
||||
class Application {
|
||||
class Application:public Thread {
|
||||
// Prevent copies and assignments
|
||||
Application(const Application&) = delete;
|
||||
Application& operator=(const Application&) = delete;
|
||||
|
||||
Reference in New Issue
Block a user