[modify] the recycle logic about resource of pthread.

This commit is contained in:
liuxianliang
2022-05-10 21:51:30 +08:00
committed by guo
parent 9ab2094ef6
commit 9f5a9b6bc8
3 changed files with 120 additions and 109 deletions

View File

@@ -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
}
}