hopefully added semaphores
This commit is contained in:
@@ -9,9 +9,9 @@
|
||||
#include "../../interrupt/guard.h"
|
||||
#include "../../debug/output.h"
|
||||
#include "../../arch/context.h"
|
||||
|
||||
#include "../../sync/semaphore.h"
|
||||
static uint8_t appl_cnt = 0;
|
||||
|
||||
extern TextStream kout;
|
||||
char text[] = "Ich mag\n\
|
||||
Saftige Pflaumen voller Aroma\n\
|
||||
Ich knuddel jede Oma ins Koma\n\
|
||||
@@ -33,18 +33,21 @@ void activeWaitDelay(uint64_t cycles) {
|
||||
//Core::pause();
|
||||
}
|
||||
}
|
||||
Semaphore foo= Semaphore(1);
|
||||
|
||||
void Application::action() { // NOLINT
|
||||
uint16_t cnt = 0;
|
||||
uint8_t row = appl_cnt++;
|
||||
while (1) {
|
||||
Guarded g= Guard::enter();
|
||||
|
||||
//koutlock.lock();
|
||||
{
|
||||
Guarded g = Guard::enter();
|
||||
//g.vault();
|
||||
g.vault().kout.setPos((unsigned)8*row,(unsigned)/*Core::getID()*2+*/1);
|
||||
g.vault().kout << cnt++ << flush;
|
||||
|
||||
foo.p(g.vault());
|
||||
kout.setPos((unsigned)8*row,(unsigned)/*Core::getID()*2+*/1);
|
||||
kout << cnt++ << flush;
|
||||
foo.v(g.vault());
|
||||
//g.vault().kout << endl << flush;
|
||||
//Guard::leave();
|
||||
//koutlock.unlock();
|
||||
|
||||
Reference in New Issue
Block a user