#include #include #include int thrd_join(thrd_t t, int *res) { void *pthread_res; int rtn = __pthread_join(t, &pthread_res); // XXX Emscripten added handling of error case if (rtn) { return thrd_error; } if (res) *res = (int)(intptr_t)pthread_res; return thrd_success; }