#define _GNU_SOURCE #include void main() { int a,s,ss,i; cpu_set_t cs; struct sched_param sp; a=sched_getaffinity(0,sizeof(cpu_set_t),&cs); printf("A - %i:\n",a); for(i=0;i<10;i++) { printf("CPU%i: %i\n",i,CPU_ISSET(i, &cs)); } s=sched_getscheduler(0); printf("S - %i:\n",s); }