pthread_join
extern int pthread_join(pthread_t thread, void **_value);
WRAPPER_FUNCTION(int, pthread_join, (pthread_t thread, void **_value),
if (pthread_join(thr, &value_ptr) != 0)
pthread_join(threads[0], NULL);
ret = pthread_join(thread, NULL);
pthread_join(ids[i], NULL);
if (pthread_join(t, NULL) != 0)
pthread_join(thread, nullptr);
pthread_join(ids[i], NULL);
errno = pthread_join(thr[j], NULL);