Add svcGetThreadList

This commit is contained in:
TuxSH 2016-12-23 15:22:31 +01:00
parent 84db84c05f
commit ba23d7224b
2 changed files with 16 additions and 0 deletions

View File

@ -561,6 +561,15 @@ Result svcGetProcessId(u32 *out, Handle handle);
*/ */
Result svcGetProcessList(s32* processCount, u32* processIds, s32 processIdMaxCount); Result svcGetProcessList(s32* processCount, u32* processIds, s32 processIdMaxCount);
/**
* @brief Gets a list of the threads of a process.
* @param[out] threadCount Pointer to output the thread count to.
* @param[out] threadIds Pointer to output the thread IDs to.
* @param threadIdMaxCount Maximum number of thread IDs.
* @param process Process handle to list the threads of.
*/
Result svcGetThreadList(s32* threadCount, u32* threadIds, s32 threadIdMaxCount, Handle process);
/** /**
* @brief Creates a port. * @brief Creates a port.
* @param[out] portServer Pointer to output the port server handle to. * @param[out] portServer Pointer to output the port server handle to.

View File

@ -427,6 +427,13 @@ SVC_BEGIN svcGetProcessList
str r1, [r3] str r1, [r3]
bx lr bx lr
SVC_BEGIN svcGetThreadList
str r0, [sp, #-0x4]!
svc 0x66
ldr r3, [sp], #4
str r1, [r3]
bx lr
SVC_BEGIN svcGetDebugThreadContext SVC_BEGIN svcGetDebugThreadContext
svc 0x67 svc 0x67
bx lr bx lr