mt: Fix missing call to mtarch_pstop()

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 <benoit.thebaudeau.dev@gmail.com>
This commit is contained in:
Benoît Thébaudeau 2016-08-10 03:58:00 +02:00
parent 82afa72c13
commit 927e9b8150

View File

@ -100,6 +100,7 @@ mt_yield(void)
void
mt_exit(void)
{
mtarch_pstop();
current->state = MT_STATE_EXITED;
current = NULL;
mtarch_yield();