#define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include int main(int argc, char **argv) { cpu_set_t set; CPU_ZERO(&set); CPU_SET(1, &set); if (sched_setaffinity(0, sizeof(set), &set) != 0) { err(EXIT_FAILURE, "failed to set cpu affinity"); } while (true) { asm volatile ("syscall" :: "a"(SYS_sched_yield) : "rcx", "r11"); } return 0; }