diff --git a/sched/signal/sig_default.c b/sched/signal/sig_default.c index 66c7c8ba96864..b129c60bebfb3 100644 --- a/sched/signal/sig_default.c +++ b/sched/signal/sig_default.c @@ -30,10 +30,10 @@ #include #include #include -#include #include #include +#include #include #include #include @@ -225,6 +225,8 @@ static void nxsig_abnormal_termination(int signo) group_kill_children(rtcb); #endif + tls_cleanup_popall(tls_get_info()); + #ifndef CONFIG_DISABLE_PTHREAD /* Check if the currently running task is actually a pthread */ @@ -235,7 +237,7 @@ static void nxsig_abnormal_termination(int signo) * REVISIT: This will not work if HAVE_GROUP_MEMBERS is not set. */ - pthread_exit(NULL); + nx_pthread_exit(NULL); } else #endif