Implement the privileged resource limit SVCs
This commit is contained in:
parent
0475b59e12
commit
23fdaff1a5
@ -776,6 +776,28 @@ Result svcGetResourceLimitLimitValues(s64* values, Handle resourceLimit, u32* na
|
|||||||
*/
|
*/
|
||||||
Result svcGetResourceLimitCurrentValues(s64* values, Handle resourceLimit, u32* names, s32 nameCount);
|
Result svcGetResourceLimitCurrentValues(s64* values, Handle resourceLimit, u32* names, s32 nameCount);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the resource limit set of a process.
|
||||||
|
* @param process Process to set the resource limit set to.
|
||||||
|
* @param resourceLimit Resource limit set handle.
|
||||||
|
*/
|
||||||
|
Result svcSetProcessResourceLimits(Handle process, Handle resourceLimit);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Creates a resource limit set.
|
||||||
|
* @param[out] resourceLimit Pointer to output the resource limit set handle to.
|
||||||
|
*/
|
||||||
|
Result svcCreateResourceLimit(Handle* resourceLimit);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the value limits of a resource limit set.
|
||||||
|
* @param resourceLimit Resource limit set to use.
|
||||||
|
* @param names Resource limit names to set the limits of.
|
||||||
|
* @param values Value limits to set.
|
||||||
|
* @param nameCount Number of resource limit names.
|
||||||
|
*/
|
||||||
|
Result svcSetResourceLimitValues(Handle resourceLimit, const u32* names, const s64* values, 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.
|
||||||
|
@ -637,6 +637,24 @@ SVC_BEGIN svcTerminateProcess
|
|||||||
bx lr
|
bx lr
|
||||||
SVC_END
|
SVC_END
|
||||||
|
|
||||||
|
SVC_BEGIN svcSetProcessResourceLimits
|
||||||
|
svc 0x77
|
||||||
|
bx lr
|
||||||
|
SVC_END
|
||||||
|
|
||||||
|
SVC_BEGIN svcCreateResourceLimits
|
||||||
|
push {r0}
|
||||||
|
svc 0x78
|
||||||
|
pop {r2}
|
||||||
|
str r1, [r2]
|
||||||
|
bx lr
|
||||||
|
SVC_END
|
||||||
|
|
||||||
|
SVC_BEGIN svcSetResourceLimitValues
|
||||||
|
svc 0x79
|
||||||
|
bx lr
|
||||||
|
SVC_END
|
||||||
|
|
||||||
SVC_BEGIN svcBackdoor
|
SVC_BEGIN svcBackdoor
|
||||||
svc 0x7B
|
svc 0x7B
|
||||||
bx lr
|
bx lr
|
||||||
|
Loading…
Reference in New Issue
Block a user