repo.or.cz
/
glibc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix another x86 sys/ucontext.h namespace issue (bug 21457).
[glibc.git]
/
posix
/
tst-cpucount.c
blob
b3691a18da742799616256f223377270d0667447
1
#include <sched.h>
2
#include <stdio.h>
3
#include <sys/param.h>
4
5
static int
6
do_test
(
void
)
7
{
8
cpu_set_t c
;
9
10
CPU_ZERO
(&
c
);
11
12
for
(
int
cnt
=
0
;
cnt
<
MIN
(
CPU_SETSIZE
,
130
); ++
cnt
)
13
{
14
int
n
=
CPU_COUNT
(&
c
);
15
if
(
n
!=
cnt
)
16
{
17
printf
(
"expected %d, not %d
\n
"
,
cnt
,
n
);
18
return
1
;
19
}
20
21
CPU_SET
(
cnt
, &
c
);
22
}
23
24
return
0
;
25
}
26
27
#define TEST_FUNCTION do_test ()
28
#include
"../test-skeleton.c"