Add some resource limit SVCs.

This commit is contained in:
Steven Smith 2016-04-14 01:19:11 -07:00
parent 6606a77719
commit fd566668d3
2 changed files with 40 additions and 0 deletions

View File

@ -631,6 +631,31 @@ s32 svcGetProcessorID(void);
*/ */
Result svcGetThreadId(u32 *out, Handle handle); 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. * @brief Gets the process ID of a thread.
* @param[out] out Pointer to output the process ID of the thread @p handle to. * @param[out] out Pointer to output the process ID of the thread @p handle to.

View File

@ -284,6 +284,21 @@ SVC_BEGIN svcGetThreadId
str r1, [r3] str r1, [r3]
bx lr 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_BEGIN svcBreak
svc 0x3C svc 0x3C
bx lr bx lr