I want to use CPU_SET, which is a glibc linux-specific macro that should be defined in sched.h The manpage clearly states that _GNU_SOURCE>
CPU_SET
sched.h
_GNU_SOURCE>
you have to define_GNU_SOURCE before anything else. This snippet works here:
#define _GNU_SOURCE #include int main() { cpu_set_t set; CPU_SET(0, &set); return 0; }