problems with pthreads
Christian Schaefer
caefer@krachstoff.net
Tue Feb 18 11:32:00 GMT 2003
hmm, sounds reasonable.
I changed to the following, though still no success..
void *print_message_function( void *ptr )
{
char *message;
message = (char *) ptr;
printf("%s ", message);
return ptr;
}
int main(int argc, char *argv[])
{
pthread_t thread1, thread2;
char *message1 = "Hello";
char *message2 = "World";
pthread_create(&thread1, NULL, &print_message_function, (void*)
message1);
pthread_create(&thread2, NULL, &print_message_function, (void*)
message2);
return 0;
More information about the Gcc-help
mailing list