Merge branch 'main' of gitlab.ibr.cs.tu-bs.de:vss/teaching/ss25/v_bsb1/Gruppe_018

main
Eggert Jung 4 months ago
commit 944d4991cb

@ -32,4 +32,5 @@ context_launch:
align 16
fake_systemv_abi:
mov rdi, r15
mov rsi, r14
ret

@ -34,7 +34,6 @@ Ticketlock koutlock;
//};
TextStream dout[Core::MAX] = {
{0, 40, 10, 14},
{40, 80, 10, 14},
@ -128,8 +127,6 @@ extern "C" int main() {
DBG << "Main CPU " << static_cast<int>(LAPIC::getID()) << endl << flush;
test1_thread.go();
//Application{}.action();
while (true){

@ -8,6 +8,7 @@
#include "../../arch/core.h"
#include "../../interrupt/guard.h"
#include "../../debug/output.h"
#include "../../arch/context.h"
char text[] = "Ich mag\n\
Saftige Pflaumen voller Aroma\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";
extern Ticketlock koutlock;
extern Context* test2; extern Context* test1;
extern uint8_t test1_stack[], test2_stack[];
void activeWaitDelay(uint64_t cycles) {
uint64_t counter = 0; // Use volatile to prevent optimization
for (uint64_t i = 0; i < cycles; ++i) {
@ -48,9 +50,9 @@ void Application::action() { // NOLINT
//koutlock.unlock();
}
Core::pause();
//activeWaitDelay(1000000000);
activeWaitDelay(10000000);
if(cnt >= sizeof(text)-1)
cnt=0;
context_switch(test2,test1);
}
}

Loading…
Cancel
Save