This commit is contained in:
Eggert Jung
2025-05-25 17:02:28 +02:00
parent 9af6bd4455
commit c4d7ca3cf0
6 changed files with 22 additions and 6 deletions

View File

@@ -6,6 +6,8 @@
#include "../../device/textstream.h"
#include "../../sync/ticketlock.h"
#include "../../arch/core.h"
#include "../../interrupt/guard.h"
char text[] = "Ich mag\n\
Saftige Pflaumen voller Aroma\n\
Ich knuddel jede Oma ins Koma\n\
@@ -34,12 +36,15 @@ void activeWaitDelay(uint64_t cycles) {
void Application::action() { // NOLINT
uint16_t cnt = 0;
while (1) {
koutlock.lock();
//koutlock.lock();
Guarded g = Guard::enter();
//g.vault();
while(text[cnt++] != '\n'){
kout << text[cnt-1];
}
kout << endl << flush;
koutlock.unlock();
Guard::leave();
//koutlock.unlock();
activeWaitDelay(1000000000);
if(cnt >= sizeof(text)-1)