Tuesday, January 04, 2011

CPU Affinity


#include

cpu_set_t mask;
CPU_ZERO(&mask);
CPU_SET(0, &mask);
CPU_SET(2, &mask);
result = sched_setaffinity(0, sizeof(mask), &mask);

No comments:

Post a Comment