[Kernel] Add idle thread

This commit is contained in:
wheremyfoodat 2023-04-18 20:42:17 +03:00
parent 94ea97a419
commit 0b46b92bb7
6 changed files with 88 additions and 3 deletions

View file

@ -111,6 +111,7 @@ class Memory {
SharedMemoryBlock(0, 0x1000, KernelHandles::HIDSharedMemHandle) // HID shared memory
};
public:
static constexpr u32 pageShift = 12;
static constexpr u32 pageSize = 1 << pageShift;
static constexpr u32 pageMask = pageSize - 1;
@ -125,6 +126,7 @@ class Memory {
static constexpr u32 DSP_CODE_MEMORY_OFFSET = 0_KB;
static constexpr u32 DSP_DATA_MEMORY_OFFSET = 256_KB;
private:
std::bitset<FCRAM_PAGE_COUNT> usedFCRAMPages;
std::optional<u32> findPaddr(u32 size);
u64 timeSince3DSEpoch();