hw: enable to destruct thread after its RM client

ref #589
This commit is contained in:
Martin Stein 2013-09-18 13:16:17 +02:00 committed by Norman Feske
parent d86bf3db64
commit e5ea660e2e

View File

@ -42,10 +42,13 @@ Platform_thread::~Platform_thread()
{
/* detach UTCB */
if (!_attaches_utcb_by_itself()) {
assert(_rm_client);
/* the RM client may be destructed before platform thread */
if (_rm_client) {
Rm_session_component * const rm = _rm_client->member_rm_session();
rm->detach(_virt_utcb);
}
}
/* free UTCB */
if (_pd_id == Kernel::core_id()) {
Range_allocator * const ram = platform()->ram_alloc();