From f9f7e6c5206c4b6573c33c4a233c1fbde2363389 Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Thu, 14 Feb 2019 13:45:25 +0800 Subject: [ptherad] Fix pthread_exit issue When pthread invokes pthread_exit, it just detach self. --- components/libc/pthreads/pthread.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'components') diff --git a/components/libc/pthreads/pthread.c b/components/libc/pthreads/pthread.c index 8e79aceb2a..55f46c0caa 100644 --- a/components/libc/pthreads/pthread.c +++ b/components/libc/pthreads/pthread.c @@ -346,12 +346,6 @@ void pthread_exit(void *value) ptd->tls = RT_NULL; } - if (ptd->attr.detachstate == PTHREAD_CREATE_JOINABLE) - { - /* release the joinable pthread */ - rt_sem_release(ptd->joinable_sem); - } - /* detach thread */ rt_thread_detach(ptd->tid); /* reschedule thread */ -- cgit v1.3.1