mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-03 12:27:21 +12:00
Implement svcGetCurrentProcessorNumber
This commit is contained in:
parent
fc2747a3d3
commit
6895a1d9d6
4 changed files with 48 additions and 5 deletions
|
@ -61,7 +61,7 @@ class Kernel {
|
|||
Handle makeProcess(u32 id);
|
||||
Handle makePort(const char* name);
|
||||
Handle makeSession(Handle port);
|
||||
Handle makeThread(u32 entrypoint, u32 initialSP, u32 priority, s32 id, u32 arg,ThreadStatus status = ThreadStatus::Dormant);
|
||||
Handle makeThread(u32 entrypoint, u32 initialSP, u32 priority, ProcessorID id, u32 arg,ThreadStatus status = ThreadStatus::Dormant);
|
||||
Handle makeMemoryBlock(u32 addr, u32 size, u32 myPermission, u32 otherPermission);
|
||||
|
||||
public:
|
||||
|
@ -126,6 +126,7 @@ private:
|
|||
void exitThread();
|
||||
void mapMemoryBlock();
|
||||
void queryMemory();
|
||||
void getCurrentProcessorNumber();
|
||||
void getProcessID();
|
||||
void getProcessInfo();
|
||||
void getResourceLimit();
|
||||
|
|
|
@ -34,6 +34,16 @@ enum class ArbitrationType {
|
|||
DecrementAndWaitIfLessTimeout = 4
|
||||
};
|
||||
|
||||
enum class ProcessorID : s32 {
|
||||
AllCPUs = -1,
|
||||
Default = -2,
|
||||
|
||||
AppCore = 0,
|
||||
Syscore = 1,
|
||||
New3DSExtra1 = 2,
|
||||
New3DSExtra2 = 3
|
||||
};
|
||||
|
||||
struct AddressArbiter {};
|
||||
|
||||
struct ResourceLimits {
|
||||
|
@ -95,7 +105,7 @@ struct Thread {
|
|||
u32 entrypoint; // Initial r15 value
|
||||
u32 priority;
|
||||
u32 arg;
|
||||
s32 processorID;
|
||||
ProcessorID 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue