Add some resource limit SVCs.
This commit is contained in:
parent
6606a77719
commit
fd566668d3
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user