Stub GPU DMA, fix up some FS stuff. horribly wrong savedata implementation

This commit is contained in:
wheremyfoodat 2022-10-15 13:28:29 +03:00
parent b6a1da21a9
commit 5d15efe72c
13 changed files with 169 additions and 35 deletions

View file

@ -39,25 +39,6 @@ class Kernel {
// Top 8 bits are the major version, bottom 8 are the minor version
u16 kernelVersion = 0;
// Get pointer to the object with the specified handle
KernelObject* getObject(Handle handle) {
// Accessing an object that has not been created
if (handle >= objects.size()) [[unlikely]] {
return nullptr;
}
return &objects[handle];
}
// Get pointer to the object with the specified handle and type
KernelObject* getObject(Handle handle, KernelObjectType type) {
if (handle >= objects.size() || objects[handle].type != type) [[unlikely]] {
return nullptr;
}
return &objects[handle];
}
Handle makeArbiter();
Handle makeEvent(ResetType resetType);
Handle makeProcess(u32 id);
@ -148,5 +129,24 @@ public:
return objects;
}
// Get pointer to the object with the specified handle
KernelObject* getObject(Handle handle) {
// Accessing an object that has not been created
if (handle >= objects.size()) [[unlikely]] {
return nullptr;
}
return &objects[handle];
}
// Get pointer to the object with the specified handle and type
KernelObject* getObject(Handle handle, KernelObjectType type) {
if (handle >= objects.size() || objects[handle].type != type) [[unlikely]] {
return nullptr;
}
return &objects[handle];
}
void sendGPUInterrupt(GPUInterrupt type) { serviceManager.requestGPUInterrupt(type); }
};