#include <pthread.h> int pthread_join( pthread_t thread, void** value_ptr );
- The target thread whose termination you're waiting for.
- NULL, or a pointer to a location where the function can store the value passed to pthread_exit() by the target thread.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The pthread_join() function blocks the calling thread until the target thread thread terminates, unless thread has already terminated. If value_ptr is non-NULL and pthread_join() returns successfully, then the value passed to pthread_exit() by the target thread is placed in value_ptr. If the target thread has been canceled then value_ptr is set to PTHREAD_CANCELED.
The target thread must be joinable. Multiple pthread_join(), pthread_timedjoin(), ThreadJoin(), and ThreadJoin_r() calls on the same target thread aren't allowed. When pthread_join() returns successfully, the target thread has been terminated.
- The thread thread is already being joined.
- The thread thread is the calling thread.
- A fault occurred trying to access the buffers provided.
- The thread thread isn't joinable.
- The thread thread doesn't exist.
Last modified: 2013-09-30