Implement svcGetThreadList

This commit is contained in:
Michael Scire 2018-06-25 03:59:03 -06:00 committed by yellows8
parent 481d27d1f1
commit 9770f4bb18
2 changed files with 16 additions and 0 deletions

View File

@ -842,6 +842,14 @@ Result svcGetDebugThreadContext(u8* out, Handle debug, u64 threadID, u32 flags);
*/
Result svcGetProcessList(u32 *num_out, u64 *pids_out, u32 max_pids);
/**
* @brief Retrieves a list of all threads for a debug handle (or zero).
* @return Result code.
* @note Syscall number 0x66.
* @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available.
*/
Result svcGetThreadList(u32 *num_out, u64 *tids_out, u32 max_tids, Handle debug);
///@}
///@name Debugging

View File

@ -445,6 +445,14 @@ SVC_BEGIN svcGetProcessList
ret
SVC_END
SVC_BEGIN svcGetThreadList
str x0, [sp, #-16]!
svc 0x66
ldr x2, [sp], #16
str w1, [x2]
ret
SVC_END
SVC_BEGIN svcGetDebugThreadContext
svc 0x67
ret