1/**************************************************************************** 2 * 3 * Simple sequence mode test. 4 * 5 * $FreeBSD$ 6 * 7 ****************************************************************************/ 8 9#include <stdio.h> 10#include <string.h> 11#include <pthread.h> 12 13void * 14entry(void * a_arg) 15{ 16 fprintf(stderr, "ok 1\n"); 17 fprintf(stderr, "ok \n"); 18 fprintf(stderr, "ok 3\n"); 19 20 return NULL; 21} 22 23int 24main() 25{ 26 pthread_t thread; 27 int error; 28 29 fprintf(stderr, "1..3\n"); 30 31 fprintf(stderr, "Some random text\n"); 32 33 error = pthread_create(&thread, NULL, entry, NULL); 34 fprintf(stderr, "More unimportant text\n"); 35 if (error) 36 fprintf(stderr,"Error in pthread_create(): %s\n", 37 strerror(error)); 38 39 error = pthread_join(thread, NULL); 40 if (error) 41 fprintf(stderr, "Error in pthread_join(): %s\n", 42 strerror(error)); 43 44 fprintf(stderr, "Hello world\n"); 45 46 return 0; 47} 48