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:
parent
82afa72c13
commit
927e9b8150
|
@ -100,6 +100,7 @@ mt_yield(void)
|
||||||
void
|
void
|
||||||
mt_exit(void)
|
mt_exit(void)
|
||||||
{
|
{
|
||||||
|
mtarch_pstop();
|
||||||
current->state = MT_STATE_EXITED;
|
current->state = MT_STATE_EXITED;
|
||||||
current = NULL;
|
current = NULL;
|
||||||
mtarch_yield();
|
mtarch_yield();
|
||||||
|
|
Loading…
Reference in a new issue