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