1. Naming things 2. Cache invalidation 3. Off-by-one errors.
#include <sched.h> cpu_set_t mask; CPU_ZERO(&mask); CPU_SET(0, &mask); result = sched_setaffinity(0, sizeof(mask), &mask);
1. Naming things 2. Cache invalidation 3. Off-by-one errors.