2.9
[glibc/nacl-glibc.git] / posix / tst-cpucount.c
blobfe3cded732bc3c5b5f10cb81e1a83dff098cd2f9
1 #include <sched.h>
2 #include <stdio.h>
4 static int
5 do_test (void)
7 cpu_set_t c;
9 CPU_ZERO (&c);
11 for (int cnt = 0; cnt < 130; ++cnt)
13 int n = CPU_COUNT (&c);
14 if (n != cnt)
16 printf ("expected %d, not %d\n", cnt, n);
17 return 1;
20 CPU_SET (cnt, &c);
23 return 0;
26 #define TEST_FUNCTION do_test ()
27 #include "../test-skeleton.c"