From: Rolf Wester (wester_at_ilt.fraunhofer.de)
Date: Fri, 17 Oct 2003 12:11:17 +0200
I'm starting using threads in an application. I read the introductiion
on http://dis.cs.umass.edu/~wagner/threads_html/tutorial.html but I
get compile time errors when using some of the eyample code. With
void * read_pipe_function( void *ptr );
char * pipename = "pipe";
pthread_mutex_init(&mutex, NULL); //pthread_mutexattr_default);
int ret = pthread_create( &thread, NULL, (void*) &read_pipe_function,
I get the error message:
error: invalid conversion from `void*' to `void*(*)(void*)'
at the pthread_create line. I have absolutely no idea what the problem
could be here. Besides this there is no delay function
defined in my pthread.h file. What did I do wrong? Can anybody tell
me where I can get a good online introduction with working examples?
I would be very appreciative for any help.
Thanks in advance.