Fix CPU affinity on FreeBSD (closes #61)

This commit is contained in:
pooler 2014-02-18 17:43:49 +01:00
parent 3f9d8727dc
commit ab5d1a86d9

View file

@ -75,7 +75,7 @@ static inline void affine_to_cpu(int id, int cpu)
cpuset_t set; cpuset_t set;
CPU_ZERO(&set); CPU_ZERO(&set);
CPU_SET(cpu, &set); CPU_SET(cpu, &set);
cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_CPUSET, -1, sizeof(cpuset_t), &set); cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, sizeof(cpuset_t), &set);
} }
#else #else
static inline void drop_policy(void) static inline void drop_policy(void)