]> Chaos Git - corbenik/ctrulib.git/commitdiff
Add some resource limit SVCs.
authorSteven Smith <Steveice10@gmail.com>
Thu, 14 Apr 2016 08:19:11 +0000 (01:19 -0700)
committerSteven Smith <Steveice10@gmail.com>
Thu, 14 Apr 2016 08:19:11 +0000 (01:19 -0700)
libctru/include/3ds/svc.h
libctru/source/svc.s

index 68f884ee536857b4f07e9e223e5822e2770d1684..25dcc9b5808e83e457bde115584612d7fdcdfda2 100644 (file)
@@ -631,6 +631,31 @@ s32    svcGetProcessorID(void);
  */
 Result svcGetThreadId(u32 *out, Handle handle);
 
+/**
+ * @brief Gets the resource limit set of a process.
+ * @param[out] resourceLimit Pointer to output the resource limit set handle to.
+ * @param process Process to get the resource limits of.
+ */
+Result svcGetResourceLimit(Handle* resourceLimit, Handle process);
+
+/**
+ * @brief Gets the value limits of a resource limit set.
+ * @param[out] values Pointer to output the value limits to.
+ * @param resourceLimit Resource limit set to use.
+ * @param names Resource limit names to get the limits of.
+ * @param nameCount Number of resource limit names.
+ */
+Result svcGetResourceLimitLimitValues(s64* values, Handle resourceLimit, u32* names, s32 nameCount);
+
+/**
+ * @brief Gets the values of a resource limit set.
+ * @param[out] values Pointer to output the values to.
+ * @param resourceLimit Resource limit set to use.
+ * @param names Resource limit names to get the values of.
+ * @param nameCount Number of resource limit names.
+ */
+Result svcGetResourceLimitCurrentValues(s64* values, Handle resourceLimit, u32* names, s32 nameCount);
+
 /**
  * @brief Gets the process ID of a thread.
  * @param[out] out Pointer to output the process ID of the thread @p handle to.
index e69c5585357b577c617fefbb730acf99710830c9..59560e5412c60d291e45413f3af8712aede99c10 100644 (file)
@@ -284,6 +284,21 @@ SVC_BEGIN svcGetThreadId
        str r1, [r3]
        bx  lr
 
+SVC_BEGIN svcGetResourceLimit
+       str r0, [sp, #-0x4]!
+       svc 0x38
+       ldr r3, [sp], #4
+       str r1, [r3]
+       bx  lr
+
+SVC_BEGIN svcGetResourceLimitLimitValues
+       svc 0x39
+       bx  lr
+
+SVC_BEGIN svcGetResourceLimitCurrentValues
+       svc 0x3A
+       bx  lr
+
 SVC_BEGIN svcBreak
        svc 0x3C
        bx  lr