implement + enable demos
This commit is contained in:
17
c_os/user/PreemptiveLoopThread.cc
Normal file
17
c_os/user/PreemptiveLoopThread.cc
Normal file
@ -0,0 +1,17 @@
|
||||
#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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user