|
|
|
@ -8,6 +8,7 @@
|
|
|
|
#include "../../arch/core.h"
|
|
|
|
#include "../../arch/core.h"
|
|
|
|
#include "../../interrupt/guard.h"
|
|
|
|
#include "../../interrupt/guard.h"
|
|
|
|
#include "../../debug/output.h"
|
|
|
|
#include "../../debug/output.h"
|
|
|
|
|
|
|
|
#include "../../arch/context.h"
|
|
|
|
char text[] = "Ich mag\n\
|
|
|
|
char text[] = "Ich mag\n\
|
|
|
|
Saftige Pflaumen voller Aroma\n\
|
|
|
|
Saftige Pflaumen voller Aroma\n\
|
|
|
|
Ich knuddel jede Oma ins Koma\n\
|
|
|
|
Ich knuddel jede Oma ins Koma\n\
|
|
|
|
@ -22,7 +23,8 @@ Und wacht sie aus'm Koma auf, kriegt sie von mir 'n Sticker\n\
|
|
|
|
\n";
|
|
|
|
\n";
|
|
|
|
|
|
|
|
|
|
|
|
extern Ticketlock koutlock;
|
|
|
|
extern Ticketlock koutlock;
|
|
|
|
|
|
|
|
extern Context* test2; extern Context* test1;
|
|
|
|
|
|
|
|
extern uint8_t test1_stack[], test2_stack[];
|
|
|
|
void activeWaitDelay(uint64_t cycles) {
|
|
|
|
void activeWaitDelay(uint64_t cycles) {
|
|
|
|
uint64_t counter = 0; // Use volatile to prevent optimization
|
|
|
|
uint64_t counter = 0; // Use volatile to prevent optimization
|
|
|
|
for (uint64_t i = 0; i < cycles; ++i) {
|
|
|
|
for (uint64_t i = 0; i < cycles; ++i) {
|
|
|
|
@ -37,6 +39,7 @@ void Application::action() { // NOLINT
|
|
|
|
while (1) {
|
|
|
|
while (1) {
|
|
|
|
//koutlock.lock();
|
|
|
|
//koutlock.lock();
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
Guarded g = Guard::enter();
|
|
|
|
Guarded g = Guard::enter();
|
|
|
|
//g.vault();
|
|
|
|
//g.vault();
|
|
|
|
g.vault().kout.setPos((unsigned)0,(unsigned)Core::getID()*2+1);
|
|
|
|
g.vault().kout.setPos((unsigned)0,(unsigned)Core::getID()*2+1);
|
|
|
|
@ -46,11 +49,22 @@ void Application::action() { // NOLINT
|
|
|
|
//g.vault().kout << endl << flush;
|
|
|
|
//g.vault().kout << endl << flush;
|
|
|
|
//Guard::leave();
|
|
|
|
//Guard::leave();
|
|
|
|
//koutlock.unlock();
|
|
|
|
//koutlock.unlock();
|
|
|
|
|
|
|
|
=======
|
|
|
|
|
|
|
|
Guarded g = Guard::enter();
|
|
|
|
|
|
|
|
//g.vault();
|
|
|
|
|
|
|
|
g.vault().kout.setPos((unsigned)0,(unsigned)Core::getID()*2+1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
g.vault().kout << test1<< flush;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//g.vault().kout << endl << flush;
|
|
|
|
|
|
|
|
//Guard::leave();
|
|
|
|
|
|
|
|
//koutlock.unlock();
|
|
|
|
|
|
|
|
>>>>>>> a0bac7f (foooo)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Core::pause();
|
|
|
|
Core::pause();
|
|
|
|
//activeWaitDelay(1000000000);
|
|
|
|
activeWaitDelay(10000000);
|
|
|
|
if(cnt >= sizeof(text)-1)
|
|
|
|
if(cnt >= sizeof(text)-1)
|
|
|
|
cnt=0;
|
|
|
|
cnt=0;
|
|
|
|
|
|
|
|
context_switch(test2,test1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|