repo.or.cz
/
valgrind.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
mc_translate.c: enable further uses of DLexpensive for scalar EQ/NE comparisons
[valgrind.git]
/
none
/
tests
/
manythreads.c
blob
3ae0c9754d3cba102c034583ae916dcea470bb70
1
/* Make sure there are no thread lifetime related leaks... */
2
#include <pthread.h>
3
#include <stdio.h>
4
5
static void
*
func
(
void
*
v
)
6
{
7
return
NULL
;
8
}
9
10
int
main
()
11
{
12
int
i
;
13
14
for
(
i
=
0
;
i
<
10000
;
i
++) {
15
pthread_t th
;
16
17
if
(
i
>
0
&&
i
%
1000
==
0
)
18
printf
(
"%d...
\n
"
,
i
);
19
20
pthread_create
(&
th
,
NULL
,
func
,
NULL
);
21
pthread_join
(
th
,
NULL
);
22
}
23
24
return
0
;
25
}