diff options
| author | liuxianliang <[email protected]> | 2022-05-10 21:51:30 +0800 |
|---|---|---|
| committer | guo <[email protected]> | 2022-05-18 08:44:30 +0800 |
| commit | 9f5a9b6bc884ff0640219677e2e18c84db2100c6 (patch) | |
| tree | 25a4a7521a462c7bfee8e6ef5d1b265c7eb7de0e /components/libc/compilers/common/stdlib.c | |
| parent | 9ab2094ef613873ed86fb5fe675691f7d47a856c (diff) | |
[modify] the recycle logic about resource of pthread.
Diffstat (limited to 'components/libc/compilers/common/stdlib.c')
| -rw-r--r-- | components/libc/compilers/common/stdlib.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/components/libc/compilers/common/stdlib.c b/components/libc/compilers/common/stdlib.c index 10da81f30e..12e379acbf 100644 --- a/components/libc/compilers/common/stdlib.c +++ b/components/libc/compilers/common/stdlib.c @@ -20,8 +20,13 @@ void __rt_libc_exit(int status) if (self != RT_NULL) { +#ifdef RT_USING_PTHREADS + extern void pthread_exit(void *value); + pthread_exit((void *)status); +#else LOG_E("thread:%s exit:%d!", self->name, status); rt_thread_control(self, RT_THREAD_CTRL_CLOSE, RT_NULL); +#endif } } |
