move task tls destruct to before _exit

Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
This commit is contained in:
chenxiaoyi 2023-05-31 14:44:51 +08:00 committed by Xiang Xiao
parent 48c153db25
commit cc690f1d21
2 changed files with 4 additions and 4 deletions

View File

@ -108,6 +108,10 @@ void exit(int status)
atexit_call_exitfuncs(status, false);
#if defined(CONFIG_TLS_TASK_NELEM) && CONFIG_TLS_TASK_NELEM > 0
task_tls_destruct();
#endif
#ifdef CONFIG_FILE_STREAM
/* Flush all streams */

View File

@ -128,10 +128,6 @@ static void group_remove(FAR struct task_group_s *group)
static inline void group_release(FAR struct task_group_s *group)
{
#if defined(CONFIG_TLS_TASK_NELEM) && CONFIG_TLS_TASK_NELEM > 0
task_tls_destruct();
#endif
task_uninit_info(group);
#if defined(CONFIG_SCHED_HAVE_PARENT) && defined(CONFIG_SCHED_CHILD_STATUS)