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 * $DragonFly: src/lib/libc_r/test/hello_d.c,v 1.2 2003/06/17 04:26:48 dillon Exp $ 7 * 8 ****************************************************************************/ 9 10 #include <stdio.h> 11 #include <string.h> 12 #include <pthread.h> 13 14 void * 15 entry(void * a_arg) 16 { 17 fprintf(stderr, "Hello world\n"); 18 19 return NULL; 20 } 21 22 int 23 main() 24 { 25 pthread_t thread; 26 int error; 27 28 error = pthread_create(&thread, NULL, entry, NULL); 29 if (error) 30 fprintf(stderr, "Error in pthread_create(): %s\n", 31 strerror(error)); 32 33 error = pthread_join(thread, NULL); 34 if (error) 35 fprintf(stderr, "Error in pthread_join(): %s\n", 36 strerror(error)); 37 38 return 0; 39 } 40