I'm attempting to print a return value from pthread_join. I have the following code:
for(j = 0 ; j < i ; ++j){
pthread_join( tid[j], returnValue); /* BLOCK */
printf("%d\n", (int)&&returnValue);
}
All of the threads are stored in the tid array and are created and returned correctly. At the end of each thread function I have the following line:
pthread_exit((void *)buf.st_size);
I am attempting to return the size of some file I was reading. For some reason I cannot get it to print the correct value. It is more then likely the way I am attempting to dereference the void ** from the pthread_join function call, but I'm not too sure how to go about doing that. Thanks in advance for any help.