Hi Guillemn,
Try these changes:
<div class='quotetop'>QUOTE </div>
--- Quote Start ---
/*void print_message_function( void ){*/
void print_message_function (void *arg){
char message = "Hello";
printf("%s ", message);
pthread_exit(NULL);
}
void main (int argc, char *argv[]){
pthread_t thread1, thread2;
//char *message1 = "Hello";
//char *message2 = "World";
//pthread_attr_t pthread_attr_default;
printf("\nThread 1");
pthread_create( &thread1, NULL, (void*)&print_message_function, NULL);
printf("\nThread 2");
pthread_create( &thread2, NULL, (void*)&print_message_function, NULL);
/*pthread_exit(NULL);*/
/* Wait for threads to exit before trashing the pthread_t vars (on stack)*/
pthread_join (thread1, NULL);
pthread_join (thread2, NULL);
exit(0);
}[/b]
--- Quote End ---
Regards,
--Scott