Last change
on this file was 2036, checked in by bird, 20 years ago |
Initial revision
|
-
Property cvs2svn:cvs-rev
set to
1.1
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
579 bytes
|
Line | |
---|
1 | #include <pthread.h>
|
---|
2 | #include <signal.h>
|
---|
3 | #include <stdio.h>
|
---|
4 | #include <string.h>
|
---|
5 | #include <unistd.h>
|
---|
6 |
|
---|
7 |
|
---|
8 | static void *
|
---|
9 | tf (void *arg)
|
---|
10 | {
|
---|
11 | while (1)
|
---|
12 | sleep (100);
|
---|
13 |
|
---|
14 | /* NOTREACHED */
|
---|
15 | return NULL;
|
---|
16 | }
|
---|
17 |
|
---|
18 |
|
---|
19 | static int
|
---|
20 | do_test (void)
|
---|
21 | {
|
---|
22 | pthread_t th;
|
---|
23 |
|
---|
24 | int e = pthread_create (&th, NULL, tf, NULL);
|
---|
25 | if (e != 0)
|
---|
26 | {
|
---|
27 | printf ("create failed: %s\n", strerror (e));
|
---|
28 | return 1;
|
---|
29 | }
|
---|
30 |
|
---|
31 | /* Terminate only this thread. */
|
---|
32 | pthread_exit (NULL);
|
---|
33 |
|
---|
34 | /* NOTREACHED */
|
---|
35 | return 1;
|
---|
36 | }
|
---|
37 |
|
---|
38 | #define EXPECTED_SIGNAL SIGALRM
|
---|
39 | #define TEST_FUNCTION do_test ()
|
---|
40 | #include "../test-skeleton.c"
|
---|
Note:
See
TracBrowser
for help on using the repository browser.