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
* sysdeps/unix/sysv/linux/m68k/sysdep.h (INLINE_SYSCALL): Don't
[glibc.git]
/
linuxthreads
/
Examples
/
ex16.c
blob
6509ae45152465ead85d2c2cd5794dd4026a0f1b
1
/* Tst case by Jakub Jelinek <jakub@redhat.com>. */
2
#include <stdlib.h>
3
#include <unistd.h>
4
#include <pthread.h>
5
6
static void
*
7
task
(
void
*
p
)
8
{
9
sleep
(
30
);
10
return
NULL
;
11
}
12
13
int
14
main
(
void
)
15
{
16
pthread_t t
;
17
int
status
;
18
19
status
=
pthread_create
(&
t
,
NULL
,
task
,
NULL
);
20
if
(
status
)
21
exit
(
status
);
22
23
status
=
pthread_detach
(
t
);
24
pthread_kill_other_threads_np
();
25
return
status
;
26
}