原创 linux下服務器端線程cpu綁定小例子

個人代碼保存,以後整合 #include <sched.h> #include <stdio.h> int set_cpu_bind(unsigned cpuid) { cpu_set_t set_mask; CPU_