The function header for pthread_create
looks like this:
int pthread_create(pthread_t * thread,
const pthread_attr_t * attr,
void * (*start_routine)(void *),
void *arg);
I understand it all except that the function pointer for start_routine
is of the form void* (*fpointer) (void*)
which means it takes in a void*
and returns a void*
.
The void*
parameter is just a way to pass in an argument to the start_routine
, I get that part, but I don't understand why the function returns a void*
? What code will even notice that return value?