You need to use sched_setaffinity(2) . For example, to run on CPUs 0 and 2 only: #define _GNU_SOURCE #include <sched.h> cpu_set_t mask; ...
確定! 回上一頁