Skip to content

Commit 8d8cb24

Browse files
committed
Revert "Don't cleanup already-detached or exiting/exited threads"
This reverts commit fbcaa9e
1 parent 4d4b596 commit 8d8cb24

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

system/lib/libc/musl/src/thread/pthread_detach.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@ static int __pthread_detach(pthread_t t)
1111
/* If the cas fails, detach state is either already-detached
1212
* or exiting/exited, and pthread_join will trap or cleanup. */
1313
if (a_cas(&t->detach_state, DT_JOINABLE, DT_DETACHED) != DT_JOINABLE)
14-
#ifdef __EMSCRIPTEN__ // XXX Emscripten don't cleanup already-detached or exiting/exited threads
15-
return EINVAL;
16-
#else
1714
return __pthread_join(t, 0);
18-
#endif
1915
return 0;
2016
}
2117

0 commit comments

Comments
 (0)