[Kernel & APT] Mutexes v0.1

This commit is contained in:
wheremyfoodat 2022-11-17 00:29:02 +02:00
parent 41e01bbdd4
commit 3c55d88fab
7 changed files with 51 additions and 8 deletions

View file

@ -46,6 +46,10 @@ class Kernel {
Handle makeSession(Handle port);
Handle makeThread(u32 entrypoint, u32 initialSP, u32 priority, s32 id, u32 arg,ThreadStatus status = ThreadStatus::Dormant);
public:
Handle makeMutex(bool locked = false); // Needs to be public to be accessible to the APT/DSP services
private:
void signalArbiter(u32 waitingAddress, s32 threadCount);
void sleepThread(s64 ns);
void sleepThreadOnArbiter(u32 waitingAddress);