mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
sel4: handle threads in destruction
- revoke utcb - suspend thread before destruction, less noise during destruction Issue #2044
This commit is contained in:
parent
2aaeb8db1b
commit
73e35cdf6a
@ -79,7 +79,13 @@ bool Platform_pd::bind_thread(Platform_thread *thread)
|
||||
|
||||
void Platform_pd::unbind_thread(Platform_thread *thread)
|
||||
{
|
||||
PDBG("not implemented");
|
||||
if (!thread)
|
||||
return;
|
||||
|
||||
if (thread->_utcb)
|
||||
_vm_space.unmap(thread->_utcb, 1);
|
||||
else
|
||||
_vm_space.unmap(thread->INITIAL_IPC_BUFFER_VIRT, 1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -217,7 +217,10 @@ Platform_thread::Platform_thread(size_t, const char *name, unsigned priority,
|
||||
|
||||
Platform_thread::~Platform_thread()
|
||||
{
|
||||
PDBG("not completely implemented");
|
||||
if (_pd) {
|
||||
seL4_TCB_Suspend(_info.tcb_sel.value());
|
||||
_pd->unbind_thread(this);
|
||||
}
|
||||
|
||||
platform_thread_registry().remove(*this);
|
||||
platform_specific()->core_sel_alloc().free(_pager_obj_sel);
|
||||
|
Loading…
x
Reference in New Issue
Block a user