mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-22 13:02:38 +02:00
Add svcGetThreadCoreMask and svcSetThreadCoreMask
This commit is contained in:
parent
0589b39f7a
commit
062ef2b188
@ -260,6 +260,20 @@ Result svcGetThreadPriority(u32* priority, Handle handle);
|
|||||||
*/
|
*/
|
||||||
Result svcSetThreadPriority(Handle handle, u32 priority);
|
Result svcSetThreadPriority(Handle handle, u32 priority);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets a thread's core mask.
|
||||||
|
* @return Result code.
|
||||||
|
* @note Syscall number 0x0E.
|
||||||
|
*/
|
||||||
|
Result svcGetThreadCoreMask(s32* preferred_core, u32* affinity_mask, Handle handle);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets a thread's core mask.
|
||||||
|
* @return Result code.
|
||||||
|
* @note Syscall number 0x0F.
|
||||||
|
*/
|
||||||
|
Result svcSetThreadCoreMask(Handle handle, s32 preferred_core, u32 affinity_mask);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets the current processor's number.
|
* @brief Gets the current processor's number.
|
||||||
* @return The current processor's number.
|
* @return The current processor's number.
|
||||||
@ -516,6 +530,7 @@ Result svcGetInfo(u64* out, u64 id0, Handle handle, u64 id1);
|
|||||||
* @brief Maps new heap memory at the desired address. [3.0.0+]
|
* @brief Maps new heap memory at the desired address. [3.0.0+]
|
||||||
* @return Result code.
|
* @return Result code.
|
||||||
* @note Syscall number 0x2A.
|
* @note Syscall number 0x2A.
|
||||||
|
* @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available.
|
||||||
*/
|
*/
|
||||||
Result svcMapPhysicalMemory(void *address, u64 size);
|
Result svcMapPhysicalMemory(void *address, u64 size);
|
||||||
|
|
||||||
@ -523,6 +538,7 @@ Result svcMapPhysicalMemory(void *address, u64 size);
|
|||||||
* @brief Undoes the effects of \ref svcMapPhysicalMemory. [3.0.0+]
|
* @brief Undoes the effects of \ref svcMapPhysicalMemory. [3.0.0+]
|
||||||
* @return Result code.
|
* @return Result code.
|
||||||
* @note Syscall number 0x2B.
|
* @note Syscall number 0x2B.
|
||||||
|
* @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available.
|
||||||
*/
|
*/
|
||||||
Result svcUnmapPhysicalMemory(void *address, u64 size);
|
Result svcUnmapPhysicalMemory(void *address, u64 size);
|
||||||
|
|
||||||
@ -548,6 +564,7 @@ Result svcSetThreadActivity(Handle thread, bool paused);
|
|||||||
* @brief Gets the maximum value a LimitableResource can have, for a Resource Limit handle.
|
* @brief Gets the maximum value a LimitableResource can have, for a Resource Limit handle.
|
||||||
* @return Result code.
|
* @return Result code.
|
||||||
* @note Syscall number 0x30.
|
* @note Syscall number 0x30.
|
||||||
|
* @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available.
|
||||||
*/
|
*/
|
||||||
Result svcGetResourceLimitLimitValue(u64 *out, Handle reslimit_h, LimitableResource which);
|
Result svcGetResourceLimitLimitValue(u64 *out, Handle reslimit_h, LimitableResource which);
|
||||||
|
|
||||||
@ -555,6 +572,7 @@ Result svcGetResourceLimitLimitValue(u64 *out, Handle reslimit_h, LimitableResou
|
|||||||
* @brief Gets the maximum value a LimitableResource can have, for a Resource Limit handle.
|
* @brief Gets the maximum value a LimitableResource can have, for a Resource Limit handle.
|
||||||
* @return Result code.
|
* @return Result code.
|
||||||
* @note Syscall number 0x31.
|
* @note Syscall number 0x31.
|
||||||
|
* @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available.
|
||||||
*/
|
*/
|
||||||
Result svcGetResourceLimitCurrentValue(u64 *out, Handle reslimit_h, LimitableResource which);
|
Result svcGetResourceLimitCurrentValue(u64 *out, Handle reslimit_h, LimitableResource which);
|
||||||
|
|
||||||
@ -604,6 +622,7 @@ Result svcReplyAndReceiveWithUserBuffer(s32* index, void* usrBuffer, u64 size, c
|
|||||||
* @brief Creates a system event.
|
* @brief Creates a system event.
|
||||||
* @return Result code.
|
* @return Result code.
|
||||||
* @note Syscall number 0x45.
|
* @note Syscall number 0x45.
|
||||||
|
* @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available.
|
||||||
*/
|
*/
|
||||||
Result svcCreateEvent(Handle* server_handle, Handle* client_handle);
|
Result svcCreateEvent(Handle* server_handle, Handle* client_handle);
|
||||||
|
|
||||||
|
@ -88,6 +88,20 @@ SVC_BEGIN svcSetThreadPriority
|
|||||||
ret
|
ret
|
||||||
SVC_END
|
SVC_END
|
||||||
|
|
||||||
|
SVC_BEGIN svcGetThreadCoreMask
|
||||||
|
stp x0, x1, [sp, #-16]!
|
||||||
|
svc 0xE
|
||||||
|
ldp x3, x4, [sp], #16
|
||||||
|
str w1, [x3]
|
||||||
|
str w2, [x4]
|
||||||
|
ret
|
||||||
|
SVC_END
|
||||||
|
|
||||||
|
SVC_BEGIN svcSetThreadCoreMask
|
||||||
|
svc 0xF
|
||||||
|
ret
|
||||||
|
SVC_END
|
||||||
|
|
||||||
SVC_BEGIN svcGetCurrentProcessorNumber
|
SVC_BEGIN svcGetCurrentProcessorNumber
|
||||||
svc 0x10
|
svc 0x10
|
||||||
ret
|
ret
|
||||||
|
Loading…
Reference in New Issue
Block a user