[Kernel] Implement GetThreadID, stub DuplicateHandle

This commit is contained in:
wheremyfoodat 2022-09-22 00:02:50 +03:00
parent 0b2e22ca6d
commit aef1520f17
5 changed files with 46 additions and 6 deletions

View file

@ -90,6 +90,7 @@ class Kernel {
void createEvent();
void createThread();
void controlMemory();
void duplicateHandle();
void mapMemoryBlock();
void queryMemory();
void getProcessInfo();
@ -97,6 +98,7 @@ class Kernel {
void getResourceLimitLimitValues();
void getResourceLimitCurrentValues();
void getSystemTick();
void getThreadID();
void sendSyncRequest();
void svcCloseHandle();
void connectToPort();

View file

@ -102,9 +102,11 @@ struct Thread {
u32 initialSP; // Initial r13 value
u32 entrypoint; // Initial r15 value
u32 priority;
u32 arg;
s32 processorID;
ThreadStatus status;
Handle handle; // OS handle for this thread
int index; // Index of the thread. 0 for the first thread, 1 for the second, and so on
// The waiting address for threads that are waiting on an AddressArbiter
u32 waitingAddress;