hw: add assertion into ~Cpu_context

Ref #5511
This commit is contained in:
Stefan Kalkowski 2025-04-03 16:08:56 +02:00 committed by Norman Feske
parent 39d23b4f6c
commit 5a8a38dbf4

View File

@ -85,6 +85,8 @@ Cpu_context::Cpu_context(Cpu &cpu,
Cpu_context::~Cpu_context()
{
assert(_cpu().id() == Cpu::executing_id() ||
&_cpu().current_context() != this);
_cpu().scheduler().remove(*this);
}