xref: /dragonfly/test/libpthread/hello_d.c (revision c9c5aa9e)
1 /****************************************************************************
2  *
3  * Simple diff mode test.
4  *
5  * $FreeBSD: src/lib/libc_r/test/hello_d.c,v 1.1.2.1 2000/07/17 22:18:32 jasone Exp $
6  *
7  ****************************************************************************/
8 
9 #include <stdio.h>
10 #include <string.h>
11 #include <pthread.h>
12 
13 void *
14 entry(void * a_arg)
15 {
16 	fprintf(stderr, "Hello world\n");
17 
18 	return NULL;
19 }
20 
21 int
22 main()
23 {
24 	pthread_t thread;
25 	int error;
26 
27 	error = pthread_create(&thread, NULL, entry, NULL);
28 	if (error)
29 		fprintf(stderr, "Error in pthread_create(): %s\n",
30 			strerror(error));
31 
32 	error = pthread_join(thread, NULL);
33 	if (error)
34 		fprintf(stderr, "Error in pthread_join(): %s\n",
35 			strerror(error));
36 
37 	return 0;
38 }
39