]> Chaos Git - corbenik/ctrulib.git/commitdiff
Add svcGetThreadList
authorTuxSH <tuxsh@sfr.fr>
Fri, 23 Dec 2016 14:22:31 +0000 (15:22 +0100)
committerTuxSH <tuxsh@sfr.fr>
Fri, 23 Dec 2016 14:30:46 +0000 (15:30 +0100)
libctru/include/3ds/svc.h
libctru/source/svc.s

index 6d6e1ddd5fdb127f22375f6f930adcaf4e868b8f..1cbb3ec72a38d6793ef2e39ef110646a0e5ec92d 100644 (file)
@@ -561,6 +561,15 @@ Result svcGetProcessId(u32 *out, Handle handle);
  */
 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.
  * @param[out] portServer Pointer to output the port server handle to.
index a0513b2efeee94caec85fe50935d797915b8e8af..1277594af9cfb082032a6790c9aeb705189829ff 100644 (file)
@@ -427,6 +427,13 @@ SVC_BEGIN svcGetProcessList
        str r1, [r3]
        bx  lr
 
+SVC_BEGIN svcGetThreadList
+       str r0, [sp, #-0x4]!
+       svc 0x66
+       ldr r3, [sp], #4
+       str r1, [r3]
+       bx  lr
+
 SVC_BEGIN svcGetDebugThreadContext
        svc 0x67
        bx lr