Hi all,
I’m wondering if there are any specific tasks pinned to CPU cores. My plugin has a helper application that needs to use a single core…
Thanks
Hi all,
I’m wondering if there are any specific tasks pinned to CPU cores. My plugin has a helper application that needs to use a single core…
Thanks
Hi @beeb,
sorry I completely missed this one
Is this a helper application running in a non-RT context or in a RT context?
If it’s a normal Linux non-RT context, you can take a look at how to set thread affinity for your thread from this snippet of code used in RASPA / SUSHI:
cpu_set_t cpuset;
CPU_ZERO(&cpuset);
CPU_SET(0, &cpuset);
auto res = pthread_attr_setaffinity_np(&task_attributes,
sizeof(cpu_set_t), &cpuset);
You can change 0 to your desired core or even call CPU_SET multiple times to set a mask on some cores.