1

add vorgabe03 + initial bump allocator

This commit is contained in:
churl
2022-05-06 11:28:20 +02:00
parent ab7a9c2ecb
commit 4ee0b701d7
17 changed files with 472 additions and 59 deletions

View File

@ -10,19 +10,25 @@
#ifndef __CPU_include__
#define __CPU_include__
class CPU {
class CPU {
private:
CPU(const CPU& copy); // Verhindere Kopieren
CPU(const CPU &copy); // Verhindere Kopieren
public:
CPU() {}
// Prozessor anhalten
inline void halt () {
asm volatile ( "cli;"
"hlt"
);
}
// Time-Stamp-Counter auslesen
inline unsigned long long int rdtsc() {
unsigned long long int ret;
asm volatile("rdtsc"
: "=A"(ret));
unsigned long long int ret;
asm volatile ( "rdtsc" : "=A"(ret) );
return ret;
}
};