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