pthread problem
From: Rolf Wester (wester_at_ilt.fraunhofer.de)
Date: 10/17/03
- Next message: Julián Albo: "Re: pthread problem"
- Previous message: Nikolay: "Questions about poll()"
- Next in thread: Julián Albo: "Re: pthread problem"
- Reply: Julián Albo: "Re: pthread problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 17 Oct 2003 12:11:17 +0200
Hi,
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 );
int main()
{
..
pthread_t thread;
char * pipename = "pipe";
pthread_mutex_init(&mutex, NULL); //pthread_mutexattr_default);
int ret = pthread_create( &thread, NULL, (void*) &read_pipe_function,
(void*) pipename);
..
}
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.
Rolf Wester
- Next message: Julián Albo: "Re: pthread problem"
- Previous message: Nikolay: "Questions about poll()"
- Next in thread: Julián Albo: "Re: pthread problem"
- Reply: Julián Albo: "Re: pthread problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]