I have a question about C concurrency programming.
In the pthread library, the prototype of pthread_join
is
int pthread_join(pthread_t tid, void **ret);
and the prototype of pthread_exit
is:
void pthread_exit(void *ret);
So I am confused that, why pthread_join
takes the return value of the process as a pointer to a void
pointer from reaped thread, but pthread_exit
only takes a void
pointer from the exited thread? I mean basically they are all return values from a thread, why there is a difference in type?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…