Reputation: 372
I have two boards with different ARM CPUs, one 2x core - running Linux kernel 4.1.x, the other 4x core - running 3.10. On those Linux installations I'm always logged in as root. From my program, I set the CPU affinity for the calling process, just like here, via sched_setaffinity(0, ... ), just that I always set it to cpu 1 only. On the Linux 4.1, it works as expected. The Linux 3.1 gives me a negative return value, and on perror(..): "Invalid argument".
Why would that be? A quad core surely has cpu 1?
Upvotes: 4
Views: 3957