diff options
| author | Bernard Xiong <[email protected]> | 2019-02-14 13:45:25 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2019-02-14 13:45:25 +0800 |
| commit | f9f7e6c5206c4b6573c33c4a233c1fbde2363389 (patch) | |
| tree | b633bc9ef9287c78841d435e94a5f7a008c82872 /components/libc/pthreads/pthread.c | |
| parent | 509a6c14ac1c47509a169be32ca89a5349c35f9f (diff) | |
[ptherad] Fix pthread_exit issue
When pthread invokes pthread_exit, it just detach self.
Diffstat (limited to 'components/libc/pthreads/pthread.c')
| -rw-r--r-- | components/libc/pthreads/pthread.c | 6 |
1 files changed, 0 insertions, 6 deletions
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 */ |
