#include "pthread_impl.h" #include WEAK_PROVIDE_VOIDP; int pthread_join(pthread_t t, void **res) { int tmp; while ((tmp = t->tid)) __timedwait(&t->tid, tmp, 0, 0, __weak_dummy_voidp, 0, 0); if (res) *res = t->result; if (t->map_base) munmap(t->map_base, t->map_size); return 0; }