How to use svcSetThreadCoreMask

Post Reply
Posts: 1
Joined: Tue Mar 05, 2019 9:11 pm

How to use svcSetThreadCoreMask

Post by devMiyax » Tue Mar 05, 2019 9:30 pm


I am new to devkitPro and Switch Development and I am developing Homebrew app using libnx.
What I'm suffering is multi-threading. In my app a thread seems to block other threads. I think it is due that my process uses only one CPU core. I find the function svcSetThreadCoreMask. I guess this function can control which thread uses which CPU core.

How can I use this function and make threads run parallelly?

Site Admin
Posts: 1436
Joined: Tue Aug 09, 2005 3:21 am
Location: UK

Re: How to use svcSetThreadCoreMask

Post by WinterMute » Wed Mar 06, 2019 6:24 pm

Don't try to use svc functions at all. The easiest thing for you is probably C11 threads right now, see
Help keep devkitPro toolchains free, Donate today

devkitPro IRC support
Personal Blog

User avatar
( ͡° ͜ʖ ͡°)
Posts: 70
Joined: Mon Jul 12, 2010 9:45 pm
Location: Seville, Spain

Re: How to use svcSetThreadCoreMask

Post by fincs » Wed Mar 06, 2019 6:27 pm

As a bonus, C11 threads as implemented by libnx are preemptively multithreaded & load balanced across cores.
Donate to devkitPro - help us stay alive!

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests