1
Files
lecture-operating-system-de…/c_os/user/PreemptiveLoopThread.cc
2022-07-04 21:24:35 +02:00

18 lines
373 B
C++

#include "user/PreemptiveLoopThread.h"
void PreemptiveLoopThread::run() {
/* Hier muss Code eingefuegt werden */
int cnt = 0;
while (true) {
// Basic synchronization by disabling PIT interrupts
cpu.disable_int();
kout.setpos(55, this->id);
kout << this->id << ": " << dec << cnt++ << endl;
cpu.enable_int();
}
}