4 ms·
Thanks for the info.
by dclusin 12y ago
Thanks for the info.
- jespersmith 12y agoHi, I'm the primary author of this library. Setting the thread affinity of the current thread should be possible using the Affinity.setAffinity(int... cpuID) call. Underneath, it calls sched_settaffinity(0, sizeof(set), &set); I'm not sure if this set the affinity of the whole process or just the thread. I suspect it is the calling thread. Let us know if you happen to find that out. Parsing the CPU layout of the machine you're running does not depend on any realtimethread code, and should work on any modern linux system.