1 #ifndef KERNOS_UTILITIES_H 2 #define KERNOS_UTILITIES_H 7 size_t Strlen(
const char *Str);
32 inline uint32_t FlagsRegister()
45 inline void out8(uint16_t Port, uint8_t Value)
55 inline uint8_t in8(uint16_t Port)
68 [[noreturn]]
inline void Hang()
80 inline constexpr uint32_t DWord()
85 #define GHETTO_GET_CR(x) uint32_t Local_##x; \ 88 "mov %%"#x", %%eax\n" \ 95 inline uint32_t ReadCR0()
101 inline uint32_t ReadCR2()
107 inline uint32_t ReadCR3()
113 inline uint32_t ReadCR4()
119 inline void kassert (
bool Condition,
const char *Str =
nullptr)
128 [[noreturn]]
inline void kpanic (
const char *Str =
nullptr)
135 #endif //KERNOS_UTILITIES_H
void kprintf(const char *Str)
Prints string to display.
size_t Strlen(const char *Str)
Count number of characters in string.