From 927e9b815054bfaff2a479a60ec8e9f09ec4342f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= Date: Wed, 10 Aug 2016 03:58:00 +0200 Subject: [PATCH] mt: Fix missing call to mtarch_pstop() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If mt_yield() needs it, then mt_exit() too. A thread could indeed be preempted while calling mt_exit(). Signed-off-by: Benoît Thébaudeau --- core/sys/mt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/sys/mt.c b/core/sys/mt.c index 430440fe8..b59d9463d 100644 --- a/core/sys/mt.c +++ b/core/sys/mt.c @@ -100,6 +100,7 @@ mt_yield(void) void mt_exit(void) { + mtarch_pstop(); current->state = MT_STATE_EXITED; current = NULL; mtarch_yield();