11 if (sched_getaffinity (getpid (), sizeof (cs
), &cs
) != 0)
13 printf ("getaffinity failed: %m\n");
19 while (CPU_COUNT (&cs
) != 0)
21 if (CPU_ISSET (cpu
, &cs
))
26 if (sched_setaffinity (getpid (), sizeof (cs2
), &cs2
) != 0)
28 printf ("setaffinity(%d) failed: %m\n", cpu
);
33 int cpu2
= sched_getcpu ();
38 puts ("getcpu syscall not implemented");
41 perror ("getcpu failed");
46 printf ("getcpu results %d not possible\n", cpu2
);
58 #define TEST_FUNCTION do_test ()
59 #include <test-skeleton.c>