From ac0e9ef9caa4ae9c0f9da228adf939378a04abfa Mon Sep 17 00:00:00 2001 From: fincs Date: Sat, 29 Nov 2014 21:40:59 +0100 Subject: [PATCH] Add svcSetThreadPriority --- libctru/include/3ds/svc.h | 1 + libctru/source/svc.s | 17 +++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/libctru/include/3ds/svc.h b/libctru/include/3ds/svc.h index 0a023e2..8a82e4e 100644 --- a/libctru/include/3ds/svc.h +++ b/libctru/include/3ds/svc.h @@ -76,5 +76,6 @@ s32 svcConnectToPort(volatile Handle* out, const char* portName); s32 svcSendSyncRequest(Handle session); s32 svcGetProcessId(u32 *out, Handle handle); s32 svcOutputDebugString(const char* str, int length); +s32 svcSetThreadPriority(Handle thread, s32 prio); #endif diff --git a/libctru/source/svc.s b/libctru/source/svc.s index 43457aa..b16f479 100644 --- a/libctru/source/svc.s +++ b/libctru/source/svc.s @@ -259,12 +259,17 @@ svcGetProcessId: str r1, [r3] bx lr +.global svcSetThreadPriority +.type svcSetThreadPriority, %function +svcSetThreadPriority: + svc 0x0C + bx lr + .global svcOutputDebugString .type svcOutputDebugString, %function svcOutputDebugString: - str r0, [sp,#-0x4]! - svc 0x3D - ldr r2, [sp], #4 - str r1, [r2] - bx lr - + str r0, [sp,#-0x4]! + svc 0x3D + ldr r2, [sp], #4 + str r1, [r2] + bx lr