summaryrefslogtreecommitdiff
path: root/src/thread
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread')
-rw-r--r--src/thread/pthread_create.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c
index 250cd0a4..6f187ee8 100644
--- a/src/thread/pthread_create.c
+++ b/src/thread/pthread_create.c
@@ -156,6 +156,7 @@ _Noreturn void __pthread_exit(void *result)
}
/* Wake any joiner. */
+ a_store(&self->detach_state, DT_EXITED);
__wake(&self->detach_state, 1, 1);
/* After the kernel thread exits, its tid may be reused. Clear it