mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-05-06 04:04:49 +12:00
[Kernel] Make WaitSyncN better
This commit is contained in:
parent
f575d4db82
commit
33158c7908
6 changed files with 128 additions and 56 deletions
include/kernel
|
@ -62,6 +62,8 @@ public:
|
|||
Handle makeMutex(bool locked = false); // Needs to be public to be accessible to the APT/DSP services
|
||||
Handle makeSemaphore(u32 initialCount, u32 maximumCount); // Needs to be public to be accessible to the service manager port
|
||||
|
||||
// Signals an event, returns true on success or false if the event does not exist
|
||||
bool signalEvent(Handle e);
|
||||
private:
|
||||
void signalArbiter(u32 waitingAddress, s32 threadCount);
|
||||
void sleepThread(s64 ns);
|
||||
|
@ -103,9 +105,7 @@ private:
|
|||
|
||||
// SVC implementations
|
||||
void arbitrateAddress();
|
||||
void clearEvent();
|
||||
void createAddressArbiter();
|
||||
void createEvent();
|
||||
void createMemoryBlock();
|
||||
void createThread();
|
||||
void controlMemory();
|
||||
|
@ -123,10 +123,12 @@ private:
|
|||
void getThreadPriority();
|
||||
void sendSyncRequest();
|
||||
void setThreadPriority();
|
||||
void signalEvent();
|
||||
void svcClearEvent();
|
||||
void svcCloseHandle();
|
||||
void svcCreateEvent();
|
||||
void svcCreateMutex();
|
||||
void svcReleaseMutex();
|
||||
void svcSignalEvent();
|
||||
void svcSleepThread();
|
||||
void connectToPort();
|
||||
void outputDebugString();
|
||||
|
|
|
@ -105,7 +105,8 @@ enum class ThreadStatus {
|
|||
Ready, // Ready to run
|
||||
WaitArbiter, // Waiting on an address arbiter
|
||||
WaitSleep, // Waiting due to a SleepThread SVC
|
||||
WaitSync1, // Waiting for AT LEAST one sync object in its wait list to be ready
|
||||
WaitSync1, // Waiting for the single object in the wait list to be ready
|
||||
WaitSyncAny, // Wait for one object of the many that might be in the wait list to be ready
|
||||
WaitSyncAll, // Waiting for ALL sync objects in its wait list to be ready
|
||||
WaitIPC, // Waiting for the reply from an IPC request
|
||||
Dormant, // Created but not yet made ready
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue