SVC: Add GetThreadPriority32 & SetThreadPriority32
This commit is contained in:
parent
ec11918323
commit
22ceaca2f4
2 changed files with 30 additions and 2 deletions
|
@ -1135,6 +1135,10 @@ static ResultCode SetThreadPriority(Core::System& system, Handle handle, u32 pri
|
|||
return RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
static ResultCode SetThreadPriority32(Core::System& system, Handle handle, u32 priority) {
|
||||
return SetThreadPriority(system, handle, priority);
|
||||
}
|
||||
|
||||
/// Get which CPU core is executing the current thread
|
||||
static u32 GetCurrentProcessorNumber(Core::System& system) {
|
||||
LOG_TRACE(Kernel_SVC, "called");
|
||||
|
@ -1933,6 +1937,12 @@ static ResultCode SetThreadCoreMask(Core::System& system, Handle thread_handle,
|
|||
return thread->SetCoreAndAffinityMask(core, affinity_mask);
|
||||
}
|
||||
|
||||
static ResultCode SetThreadCoreMask32(Core::System& system, Handle thread_handle, u32 core,
|
||||
u32 affinity_mask_low, u32 affinity_mask_high) {
|
||||
const u64 affinity_mask = static_cast<u64>(affinity_mask_low) | (static_cast<u64>(affinity_mask_high) << 32);
|
||||
return SetThreadCoreMask(system, thread_handle, core, affinity_mask);
|
||||
}
|
||||
|
||||
static ResultCode CreateEvent(Core::System& system, Handle* write_handle, Handle* read_handle) {
|
||||
LOG_DEBUG(Kernel_SVC, "called");
|
||||
|
||||
|
@ -2206,9 +2216,9 @@ static const FunctionDef SVC_Table_32[] = {
|
|||
{0x0a, nullptr, "ExitThread32"},
|
||||
{0x0b, nullptr, "SleepThread32"},
|
||||
{0x0c, SvcWrap32<GetThreadPriority32>, "GetThreadPriority32"},
|
||||
{0x0d, nullptr, "SetThreadPriority32"},
|
||||
{0x0d, SvcWrap32<SetThreadPriority32>, "SetThreadPriority32"},
|
||||
{0x0e, nullptr, "GetThreadCoreMask32"},
|
||||
{0x0f, nullptr, "SetThreadCoreMask32"},
|
||||
{0x0f, SvcWrap32<SetThreadCoreMask32>, "SetThreadCoreMask32"},
|
||||
{0x10, nullptr, "GetCurrentProcessorNumber32"},
|
||||
{0x11, nullptr, "SignalEvent32"},
|
||||
{0x12, nullptr, "ClearEvent32"},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue