pps_fetch: introduce a helper to handle timeouts
[dragonfly.git] / test / libpthread / hello_d.c
blob254d41b7ae0d2bc90268db26bd95bb3e682e6f2c
1 /****************************************************************************
3 * Simple diff mode test.
5 * $FreeBSD: src/lib/libc_r/test/hello_d.c,v 1.1.2.1 2000/07/17 22:18:32 jasone Exp $
7 ****************************************************************************/
9 #include <stdio.h>
10 #include <string.h>
11 #include <pthread.h>
13 void *
14 entry(void * a_arg)
16 fprintf(stderr, "Hello world\n");
18 return NULL;
21 int
22 main()
24 pthread_t thread;
25 int error;
27 error = pthread_create(&thread, NULL, entry, NULL);
28 if (error)
29 fprintf(stderr, "Error in pthread_create(): %s\n",
30 strerror(error));
32 error = pthread_join(thread, NULL);
33 if (error)
34 fprintf(stderr, "Error in pthread_join(): %s\n",
35 strerror(error));
37 return 0;